Skip to content

Commit

Permalink
Merge pull request #37 from SouthernCrossGaming/master
Browse files Browse the repository at this point in the history
Open Fortress support
  • Loading branch information
sapphonie authored Oct 18, 2023
2 parents bf6b94b + d39392f commit 47d00d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/nativevotes.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ void PerformVisChecks(int client, ArrayList hVoteTypes)
Action hide = Plugin_Continue;

#if defined LOG
LogMessage("Checking visibility forward for %d: %d", voteData.CallVoteList_VoteType., g_CallVotes[voteData.CallVoteList_VoteType].CallVote_Vis);
LogMessage("Checking visibility forward for %d: %d", voteData.CallVoteList_VoteType, g_CallVotes[voteData.CallVoteList_VoteType].CallVote_Vis);
#endif
Call_StartForward(g_CallVotes[voteData.CallVoteList_VoteType].CallVote_Vis);
Call_PushCell(client);
Expand Down
8 changes: 8 additions & 0 deletions addons/sourcemod/scripting/nativevotes/game.sp
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,11 @@ static ConVar g_Cvar_HideDisabledIssues;
static int s_nNativeVoteIdx = 0;

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 @@ -388,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:
Expand Down

0 comments on commit 47d00d6

Please sign in to comment.