Skip to content

Commit

Permalink
Update game.sp
Browse files Browse the repository at this point in the history
Slightly cleaner
  • Loading branch information
rowedahelicon authored Oct 18, 2023
1 parent 573195f commit d39392f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions addons/sourcemod/scripting/nativevotes/game.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -389,20 +390,19 @@ 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:
{
return true;
}
}

//Fix for Open Fortress
if (g_EngineVersion == Engine_SDK2013 && StrEqual(gameDir, "open_fortress"))
{
g_EngineVersion = Engine_TF2;
return true;
}

return false;
}
Expand Down

0 comments on commit d39392f

Please sign in to comment.