From d39392f818133ebb7efb91532d10acbe38b5a1e1 Mon Sep 17 00:00:00 2001 From: Rowedahelicon Date: Tue, 17 Oct 2023 22:19:50 -0400 Subject: [PATCH] Update game.sp Slightly cleaner --- addons/sourcemod/scripting/nativevotes/game.sp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/sourcemod/scripting/nativevotes/game.sp b/addons/sourcemod/scripting/nativevotes/game.sp index d26c24e..12015c3 100644 --- a/addons/sourcemod/scripting/nativevotes/game.sp +++ b/addons/sourcemod/scripting/nativevotes/game.sp @@ -374,6 +374,7 @@ bool isTF2SDKModHack = false; bool Game_IsGameSupported(char[] engineName="", int maxlength=0) { g_EngineVersion = GetEngineVersion(); + g_bUserBuf = GetFeatureStatus(FeatureType_Native, "GetUserMessageType") == FeatureStatus_Available && GetUserMessageType() == UM_Protobuf; //LogMessage("Detected Engine version: %d", g_EngineVersion); @@ -389,6 +390,12 @@ bool Game_IsGameSupported(char[] engineName="", int maxlength=0) isTF2SDKModHack = true; } + //Fix for Open Fortress + if (g_EngineVersion == Engine_SDK2013 && StrEqual(gameDir, "open_fortress")) + { + g_EngineVersion = Engine_TF2; + } + switch (g_EngineVersion) { case Engine_Left4Dead, Engine_Left4Dead2, Engine_CSGO, Engine_TF2: @@ -396,13 +403,6 @@ bool Game_IsGameSupported(char[] engineName="", int maxlength=0) return true; } } - - //Fix for Open Fortress - if (g_EngineVersion == Engine_SDK2013 && StrEqual(gameDir, "open_fortress")) - { - g_EngineVersion = Engine_TF2; - return true; - } return false; }