Skip to content

Commit

Permalink
Remove Version Check from TTT-SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Bara committed Nov 27, 2018
1 parent 63b900b commit 5821e51
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 35 deletions.
30 changes: 1 addition & 29 deletions addons/sourcemod/scripting/include/ttt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

#define LoopValidClients(%1) for(int %1 = 1; %1 <= MaxClients; %1++) if(TTT_IsClientValid(%1))

#define TTT_PLUGIN_NAME "Trouble in Terrorist Town"
#define TTT_PLUGIN_AUTHOR "TTT-Contributors"
#define TTT_PLUGIN_DESCRIPTION "The game is about a group of \"terrorists\" who have traitors among them, out to kill everyone who's not a traitor."
#define TTT_PLUGIN_VERSION "<VERSION>"
#define TTT_PLUGIN_URL "https://github.com/Bara/TroubleinTerroristTown"

#define TTT_TEAM_UNASSIGNED (1 << 0)
#define TTT_TEAM_INNOCENT (1 << 1)
#define TTT_TEAM_TRAITOR (1 << 2)
Expand All @@ -20,7 +14,7 @@
#define MAX_ITEM_LENGTH 64
#define TTT_LOG_SIZE 512

#include <autoexecconfig>
#include <ttt_stock>
#include <cstrike>

enum Ragdolls
Expand Down Expand Up @@ -671,15 +665,6 @@ stock bool TTT_IsClientValid(int client)
return false;
}

stock void TTT_IsGameCSGO()
{
if (GetEngineVersion() != Engine_CSGO)
{
SetFailState("Only CS:GO Support!");
return;
}
}

#pragma deprecated TTT_HasCVarFlags is "unsafe". Please use TTT_CheckCommandAccess
stock bool TTT_HasCVarFlags(int client, ConVar cFlags)
{
Expand Down Expand Up @@ -889,19 +874,6 @@ stock void TTT_ClearTimer(Handle &timer, bool autoClose = false)
}
}

stock void TTT_StartConfig(char[] file, char[] directory = "ttt")
{
AutoExecConfig_SetCreateDirectory(true);
AutoExecConfig_SetCreateFile(true);
AutoExecConfig_SetFile(file, directory);
}

stock void TTT_EndConfig()
{
AutoExecConfig_ExecuteFile();
AutoExecConfig_CleanFile();
}

stock bool TTT_IsWarmUp()
{
return view_as<bool>(GameRules_GetProp("m_bWarmupPeriod"));
Expand Down
34 changes: 34 additions & 0 deletions addons/sourcemod/scripting/include/ttt_stock.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#if defined _ttt_stock_included
#endinput
#endif
#define _ttt_stock_included

#define TTT_PLUGIN_NAME "Trouble in Terrorist Town"
#define TTT_PLUGIN_AUTHOR "TTT-Contributors"
#define TTT_PLUGIN_DESCRIPTION "The game is about a group of \"terrorists\" who have traitors among them, out to kill everyone who's not a traitor."
#define TTT_PLUGIN_VERSION "<VERSION>"
#define TTT_PLUGIN_URL "https://github.com/Bara/TroubleinTerroristTown"

#include <autoexecconfig>

stock void TTT_StartConfig(char[] file, char[] directory = "ttt")
{
AutoExecConfig_SetCreateDirectory(true);
AutoExecConfig_SetCreateFile(true);
AutoExecConfig_SetFile(file, directory);
}

stock void TTT_EndConfig()
{
AutoExecConfig_ExecuteFile();
AutoExecConfig_CleanFile();
}

stock void TTT_IsGameCSGO()
{
if (GetEngineVersion() != Engine_CSGO)
{
SetFailState("Only CS:GO Support!");
return;
}
}
7 changes: 1 addition & 6 deletions addons/sourcemod/scripting/ttt/ttt_sql.sp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#include <ttt>
#include <ttt_stock>
#include <ttt_sql>

#define PLUGIN_NAME TTT_PLUGIN_NAME ... " - SQL Manager"
Expand Down Expand Up @@ -54,11 +54,6 @@ public void OnPluginStart()
g_iRetries = 0;
}

public void TTT_OnLatestVersion(const char[] version)
{
TTT_CheckVersion(TTT_PLUGIN_VERSION, TTT_GetCommitsCount());
}

public void OnConfigsExecuted()
{
SQL_Start();
Expand Down

0 comments on commit 5821e51

Please sign in to comment.