diff --git a/addons/sourcemod/scripting/confoglcompmod.sp b/addons/sourcemod/scripting/confoglcompmod.sp index 3701e8064..79de341ac 100644 --- a/addons/sourcemod/scripting/confoglcompmod.sp +++ b/addons/sourcemod/scripting/confoglcompmod.sp @@ -3,7 +3,7 @@ #define DEBUG_ALL 0 -#define PLUGIN_VERSION "2.4.4" +#define PLUGIN_VERSION "2.4.5" // Using these macros, you can disable unnecessary modules, // and they will not be included in the plugin at compile time, @@ -500,7 +500,7 @@ public Action L4D_OnFirstSurvivorLeftSafeArea(int client) return Plugin_Continue; } -public Action OFSLA_ForceMobSpawnTimer(Handle hTimer) +static Action OFSLA_ForceMobSpawnTimer(Handle hTimer) { // Workaround to make tank horde blocking always work // Makes the first horde always start 100s after survivors leave saferoom diff --git a/addons/sourcemod/scripting/confoglcompmod/BossSpawning.sp b/addons/sourcemod/scripting/confoglcompmod/BossSpawning.sp index 1e3b8fe69..9be1172ac 100644 --- a/addons/sourcemod/scripting/confoglcompmod/BossSpawning.sp +++ b/addons/sourcemod/scripting/confoglcompmod/BossSpawning.sp @@ -58,12 +58,12 @@ void BS_OnMapStart() GetCurrentMap(BS_sMap, sizeof(BS_sMap)); } -public void BS_ConVarChange(ConVar convar, const char[] oldValue, const char[] newValue) +static void BS_ConVarChange(ConVar convar, const char[] oldValue, const char[] newValue) { BS_bEnabled = BS_hEnabled.BoolValue; } -public void BS_WitchSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void BS_WitchSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!BS_bEnabled || !IsPluginEnabled()) { return; @@ -151,7 +151,7 @@ void BS_OnTankSpawnPost_Forward(int iTankClient) } } -public void BS_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void BS_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) { BS_bIsFirstRound = false; BS_bFinaleStarted = false; @@ -165,12 +165,12 @@ public void BS_RoundEnd(Event hEvent, const char[] sEventName, bool bDontBroadca } } -public void BS_FinaleStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void BS_FinaleStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { BS_bFinaleStarted = true; } -public Action BS_WitchTimerReset(Handle hTimer) +static Action BS_WitchTimerReset(Handle hTimer) { BS_bDeleteWitches = false; diff --git a/addons/sourcemod/scripting/confoglcompmod/BotKick.sp b/addons/sourcemod/scripting/confoglcompmod/BotKick.sp index a8dd0ff92..ecbff71ab 100644 --- a/addons/sourcemod/scripting/confoglcompmod/BotKick.sp +++ b/addons/sourcemod/scripting/confoglcompmod/BotKick.sp @@ -40,7 +40,7 @@ void BK_OnModuleStart() HookEvent("player_bot_replace", BK_PlayerBotReplace); } -public void BK_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void BK_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { BK_iEnable = BK_hEnable.IntValue; } @@ -68,7 +68,7 @@ bool BK_OnClientConnect(int iClient) return false; } -public Action BK_CheckInfBotReplace_Timer(Handle hTimer, any iClient) +static Action BK_CheckInfBotReplace_Timer(Handle hTimer, any iClient) { if (iClient != BK_lastvalidbot && IsClientInGame(iClient) && IsFakeClient(iClient)) { KickClient(iClient, "[Confogl] Kicking late infected bot..."); @@ -79,7 +79,7 @@ public Action BK_CheckInfBotReplace_Timer(Handle hTimer, any iClient) return Plugin_Stop; } -public void BK_PlayerBotReplace(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void BK_PlayerBotReplace(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!GT_IsTankInPlay()) { return; @@ -93,7 +93,7 @@ public void BK_PlayerBotReplace(Event hEvent, const char[] sEventName, bool bDon } } -public Action BK_CancelValidBot_Timer(Handle hTimer) +static Action BK_CancelValidBot_Timer(Handle hTimer) { BK_lastvalidbot = -1; diff --git a/addons/sourcemod/scripting/confoglcompmod/ClientSettings.sp b/addons/sourcemod/scripting/confoglcompmod/ClientSettings.sp index a1685aebb..a2d570df3 100644 --- a/addons/sourcemod/scripting/confoglcompmod/ClientSettings.sp +++ b/addons/sourcemod/scripting/confoglcompmod/ClientSettings.sp @@ -85,7 +85,7 @@ static void ClearCLSEntry(CLSEntry entry[CLSEntry]) } #endif*/ -public Action _CheckClientSettings_Timer(Handle hTimer) +static Action _CheckClientSettings_Timer(Handle hTimer) { if (!IsPluginEnabled()) { if (IsDebugEnabled()) { @@ -129,7 +129,7 @@ static void EnforceCliSettings(int client) #endif } -public void _EnforceCliSettings_QueryReply(QueryCookie cookie, int client, ConVarQueryResult result, \ +static void _EnforceCliSettings_QueryReply(QueryCookie cookie, int client, ConVarQueryResult result, \ const char[] cvarName, const char[] cvarValue, any value) { if (!IsClientConnected(client) || !IsClientInGame(client) || IsClientInKickQueue(client)) { @@ -225,7 +225,7 @@ public void _EnforceCliSettings_QueryReply(QueryCookie cookie, int client, ConVa #endif } -public Action _ClientSettings_Cmd(int client, int args) +static Action _ClientSettings_Cmd(int client, int args) { int iSize = ClientSettingsArray.Length; ReplyToCommand(client, "[Confogl] Tracked Client CVars (Total %d)", iSize); @@ -290,7 +290,7 @@ public Action _ClientSettings_Cmd(int client, int args) return Plugin_Handled; } -public Action _TrackClientCvar_Cmd(int args) +static Action _TrackClientCvar_Cmd(int args) { if (args < 3 || args == 4) { PrintToServer("Usage: confogl_trackclientcvar [ []]"); @@ -347,7 +347,7 @@ public Action _TrackClientCvar_Cmd(int args) return Plugin_Handled; } -public Action _ResetTracking_Cmd(int args) +static Action _ResetTracking_Cmd(int args) { if (ClientSettingsCheckTimer != null) { PrintToServer("Can't reset tracking in the middle of a match"); @@ -360,7 +360,7 @@ public Action _ResetTracking_Cmd(int args) return Plugin_Handled; } -public Action _StartClientChecking_Cmd(int args) +static Action _StartClientChecking_Cmd(int args) { _StartTracking(); diff --git a/addons/sourcemod/scripting/confoglcompmod/CvarSettings.sp b/addons/sourcemod/scripting/confoglcompmod/CvarSettings.sp index 55395df47..e5f09cd18 100644 --- a/addons/sourcemod/scripting/confoglcompmod/CvarSettings.sp +++ b/addons/sourcemod/scripting/confoglcompmod/CvarSettings.sp @@ -60,7 +60,7 @@ void CVS_OnConfigsExecuted() } } -public Action CVS_SetCvars_Cmd(int args) +static Action CVS_SetCvars_Cmd(int args) { if (!IsPluginEnabled()) { return Plugin_Handled; @@ -81,7 +81,7 @@ public Action CVS_SetCvars_Cmd(int args) return Plugin_Handled; } -public Action CVS_AddCvar_Cmd(int args) +static Action CVS_AddCvar_Cmd(int args) { if (args != 2) { PrintToServer("Usage: confogl_addcvar "); @@ -104,7 +104,7 @@ public Action CVS_AddCvar_Cmd(int args) return Plugin_Handled; } -public Action CVS_ResetCvars_Cmd(int args) +static Action CVS_ResetCvars_Cmd(int args) { if (IsPluginEnabled()) { PrintToServer("Can't reset tracking in the middle of a match"); @@ -117,7 +117,7 @@ public Action CVS_ResetCvars_Cmd(int args) return Plugin_Handled; } -public Action CVS_CvarSettings_Cmd(int client, int args) +static Action CVS_CvarSettings_Cmd(int client, int args) { if (!IsPluginEnabled()) { return Plugin_Handled; @@ -176,7 +176,7 @@ public Action CVS_CvarSettings_Cmd(int client, int args) return Plugin_Handled; } -public Action CVS_CvarDiff_Cmd(int client, int args) +static Action CVS_CvarDiff_Cmd(int client, int args) { if (!IsPluginEnabled()) { return Plugin_Handled; @@ -389,7 +389,7 @@ static void AddCvar(const char[] cvar, const char[] newval) #endif } -public void CVS_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void CVS_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { if (bTrackingStarted) { char sName[CVS_CVAR_MAXLEN]; diff --git a/addons/sourcemod/scripting/confoglcompmod/EntityRemover.sp b/addons/sourcemod/scripting/confoglcompmod/EntityRemover.sp index 45a85e69f..17fbc55b4 100644 --- a/addons/sourcemod/scripting/confoglcompmod/EntityRemover.sp +++ b/addons/sourcemod/scripting/confoglcompmod/EntityRemover.sp @@ -5,7 +5,7 @@ #define ER_MODULE_NAME "EntityRemover" -#define DEBUG_ER 0 +#define DEBUG_ER false #define ER_KV_ACTION_KILL 1 @@ -55,7 +55,7 @@ void ER_OnModuleStart() HookEvent("round_start", ER_RoundStart_Event, EventHookMode_PostNoCopy); } -public void ER_ConVarChange(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) +static void ER_ConVarChange(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) { ER_bKillParachutist = ER_hKillParachutist.BoolValue; ER_bReplaceGhostHurt = ER_hReplaceGhostHurt.BoolValue; @@ -121,7 +121,7 @@ static void ER_KV_Load() kERData.Rewind(); } -public Action ER_KV_CmdReload(int client, int args) +static Action ER_KV_CmdReload(int client, int args) { if (!IsPluginEnabled()) { return Plugin_Continue; @@ -348,7 +348,7 @@ static bool ER_ReplaceTriggerHurtGhost(int ent) return false; } -public void ER_RoundStart_Event(Event hEvent, const char[] sEventName, bool bdontBroadcast) +static void ER_RoundStart_Event(Event hEvent, const char[] sEventName, bool bdontBroadcast) { if (!IsPluginEnabled()) { return; @@ -357,7 +357,7 @@ public void ER_RoundStart_Event(Event hEvent, const char[] sEventName, bool bdon CreateTimer(0.3, ER_RoundStart_Timer, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action ER_RoundStart_Timer(Handle hTimer) +static Action ER_RoundStart_Timer(Handle hTimer) { char sBuffer[MAX_ENTITY_NAME_LENGTH]; if (ER_bDebugEnabled || IsDebugEnabled()) { diff --git a/addons/sourcemod/scripting/confoglcompmod/FinaleSpawn.sp b/addons/sourcemod/scripting/confoglcompmod/FinaleSpawn.sp index 2bd6cd56a..598b1187b 100644 --- a/addons/sourcemod/scripting/confoglcompmod/FinaleSpawn.sp +++ b/addons/sourcemod/scripting/confoglcompmod/FinaleSpawn.sp @@ -26,17 +26,17 @@ void FS_OnModuleStart() HookEvent("finale_start", FS_FinaleStart_Event, EventHookMode_PostNoCopy); } -public void FS_Round_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void FS_Round_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { FS_bIsFinale = false; } -public void FS_FinaleStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void FS_FinaleStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { FS_bIsFinale = true; } -public void FS_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void FS_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { FS_bEnabled = FS_hEnabled.BoolValue; } @@ -46,7 +46,7 @@ void FS_OnClientPutInServer(int client) SDKHook(client, SDKHook_PreThinkPost, HookCallback); } -public void HookCallback(int client) +static void HookCallback(int client) { if (!FS_bIsFinale) { return; diff --git a/addons/sourcemod/scripting/confoglcompmod/GhostTank.sp b/addons/sourcemod/scripting/confoglcompmod/GhostTank.sp index b21893138..324c8674f 100644 --- a/addons/sourcemod/scripting/confoglcompmod/GhostTank.sp +++ b/addons/sourcemod/scripting/confoglcompmod/GhostTank.sp @@ -140,7 +140,7 @@ Action GT_OnTryOfferingTankBot(bool &enterStasis) return Plugin_Continue; } -public void GT_FinaleVehicleIncoming(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GT_FinaleVehicleIncoming(Event hEvent, const char[] sEventName, bool bDontBroadcast) { g_bGT_FinaleVehicleIncoming = true; @@ -150,7 +150,7 @@ public void GT_FinaleVehicleIncoming(Event hEvent, const char[] sEventName, bool } } -public void GT_ItemPickup(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GT_ItemPickup(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_bGT_TankIsInPlay) { return; @@ -171,13 +171,13 @@ public void GT_ItemPickup(Event hEvent, const char[] sEventName, bool bDontBroad } } -public void GT_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GT_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { g_bGT_FinaleVehicleIncoming = false; GT_Reset(); } -public void GT_TankKilled(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GT_TankKilled(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_bGT_TankIsInPlay) { return; @@ -191,7 +191,7 @@ public void GT_TankKilled(Event hEvent, const char[] sEventName, bool bDontBroad g_hGT_TankDeathTimer = CreateTimer(1.0, GT_TankKilled_Timer); } -public void GT_TankSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GT_TankSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); g_iGT_TankClient = client; @@ -222,7 +222,7 @@ public void GT_TankSpawn(Event hEvent, const char[] sEventName, bool bDontBroadc CreateTimer(fFireImmunityTime, GT_FireImmunityTimer); } -public void GT_TankOnFire(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GT_TankOnFire(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int dmgtype = hEvent.GetInt("type"); @@ -245,7 +245,7 @@ public void GT_TankOnFire(Event hEvent, const char[] sEventName, bool bDontBroad SetEntityHealth(client, iSetHealth); } -public void GT_PlayerIncap(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GT_PlayerIncap(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!g_bGT_TankIsInPlay || !IsPluginEnabled() || !g_hGT_Enabled.BoolValue) { return; @@ -270,7 +270,7 @@ public void GT_PlayerIncap(Event hEvent, const char[] sEventName, bool bDontBroa CreateTimer(0.4, GT_IncapTimer, userid, TIMER_FLAG_NO_MAPCHANGE); } -public Action GT_IncapTimer(Handle hTimer, int userid) +static Action GT_IncapTimer(Handle hTimer, int userid) { int client = GetClientOfUserId(userid); if (client > 0) { @@ -281,14 +281,14 @@ public Action GT_IncapTimer(Handle hTimer, int userid) return Plugin_Stop; } -public Action GT_ResumeTankTimer(Handle hTimer) +static Action GT_ResumeTankTimer(Handle hTimer) { GT_ResumeTank(); return Plugin_Stop; } -public Action GT_FireImmunityTimer(Handle hTimer) +static Action GT_FireImmunityTimer(Handle hTimer) { g_bGT_TankHasFireImmunity = false; @@ -332,7 +332,7 @@ static void GT_Reset() g_bGT_TankHasFireImmunity = true; } -public Action GT_TankKilled_Timer(Handle hTimer) +static Action GT_TankKilled_Timer(Handle hTimer) { GT_Reset(); diff --git a/addons/sourcemod/scripting/confoglcompmod/GhostWarp.sp b/addons/sourcemod/scripting/confoglcompmod/GhostWarp.sp index 076e7a23f..176014ddc 100644 --- a/addons/sourcemod/scripting/confoglcompmod/GhostWarp.sp +++ b/addons/sourcemod/scripting/confoglcompmod/GhostWarp.sp @@ -36,7 +36,7 @@ void GW_OnModuleStart() HookEvent("round_start", GW_RoundStart); } -public void GW_ConVarsChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void GW_ConVarsChanged(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { GW_bEnabled = GW_hGhostWarp.BoolValue; GW_bReload = GW_hGhostWarpReload.BoolValue; @@ -67,7 +67,7 @@ bool GW_OnPlayerRunCmd(int iClient, int iButtons) return true; } -public void GW_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GW_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { for (int i = 1; i <= MaxClients; i++) { GW_bDelay[i] = false; @@ -75,21 +75,21 @@ public void GW_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroad } } -public void GW_PlayerDeath_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void GW_PlayerDeath_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int iClient = GetClientOfUserId(hEvent.GetInt("userid")); GW_iLastTarget[iClient] = -1; } -public Action GW_ResetDelay(Handle hTimer, any iClient) +static Action GW_ResetDelay(Handle hTimer, any iClient) { GW_bDelay[iClient] = false; return Plugin_Stop; } -public Action GW_Cmd_WarpToSurvivor(int iClient, int iArgs) +static Action GW_Cmd_WarpToSurvivor(int iClient, int iArgs) { if (iClient < 1 || iArgs != 1) { return Plugin_Handled; diff --git a/addons/sourcemod/scripting/confoglcompmod/ItemTracking.sp b/addons/sourcemod/scripting/confoglcompmod/ItemTracking.sp index 9ef1f9082..4178e168d 100644 --- a/addons/sourcemod/scripting/confoglcompmod/ItemTracking.sp +++ b/addons/sourcemod/scripting/confoglcompmod/ItemTracking.sp @@ -197,12 +197,12 @@ void IT_OnMapStart() g_bIsRound1Over = false; } -public void _IT_RoundEndEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void _IT_RoundEndEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) { g_bIsRound1Over = true; } -public void _IT_RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void _IT_RoundStartEvent(Event hEvent, const char[] sEventName, bool bDontBroadcast) { g_iSaferoomCount[START_SAFEROOM - 1] = 0; g_iSaferoomCount[END_SAFEROOM - 1] = 0; @@ -220,7 +220,7 @@ public void _IT_RoundStartEvent(Event hEvent, const char[] sEventName, bool bDon CreateTimer(1.0, IT_RoundStartTimer, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action IT_RoundStartTimer(Handle hTimer) +static Action IT_RoundStartTimer(Handle hTimer) { if (!g_bIsRound1Over) { // Round1 diff --git a/addons/sourcemod/scripting/confoglcompmod/MapInfo.sp b/addons/sourcemod/scripting/confoglcompmod/MapInfo.sp index 5cd36a14e..f10acfd8d 100644 --- a/addons/sourcemod/scripting/confoglcompmod/MapInfo.sp +++ b/addons/sourcemod/scripting/confoglcompmod/MapInfo.sp @@ -68,7 +68,7 @@ void MI_OnModuleEnd() MI_KV_Close(); } -public void PlayerDisconnect_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void PlayerDisconnect_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int client = GetClientOfUserId(hEvent.GetInt("userid")); if (client > 0 && client <= MaxClients) { @@ -76,7 +76,7 @@ public void PlayerDisconnect_Event(Event hEvent, const char[] sEventName, bool b } } -public Action MI_KV_CmdSave(int client, int args) +static Action MI_KV_CmdSave(int client, int args) { char sCurMap[128]; GetCurrentMap(sCurMap, sizeof(sCurMap)); @@ -98,7 +98,7 @@ public Action MI_KV_CmdSave(int client, int args) return Plugin_Handled; } -public Action MI_KV_CmdSaveLoc(int client, int args) +static Action MI_KV_CmdSaveLoc(int client, int args) { bool updateinfo = false; char sCurMap[128]; @@ -414,12 +414,12 @@ stock float GetMapStartExtraDist() //WeaponInformation use it } // Natives -public int _native_IsMapDataAvailable(Handle plugin, int numParams) +static int _native_IsMapDataAvailable(Handle plugin, int numParams) { return IsMapDataAvailable(); } -public int _native_GetMapValueInt(Handle plugin, int numParams) +static int _native_GetMapValueInt(Handle plugin, int numParams) { int iLen = 0; GetNativeStringLength(1, iLen); @@ -433,9 +433,9 @@ public int _native_GetMapValueInt(Handle plugin, int numParams) } #if SOURCEMOD_V_MINOR > 9 -public any _native_GetMapValueFloat(Handle plugin, int numParams) +static any _native_GetMapValueFloat(Handle plugin, int numParams) #else -public int _native_GetMapValueFloat(Handle plugin, int numParams) +static int _native_GetMapValueFloat(Handle plugin, int numParams) #endif { int iLen = 0; @@ -454,7 +454,7 @@ public int _native_GetMapValueFloat(Handle plugin, int numParams) #endif } -public int _native_GetMapValueVector(Handle plugin, int numParams) +static int _native_GetMapValueVector(Handle plugin, int numParams) { int iLen = 0; GetNativeStringLength(1, iLen); @@ -471,7 +471,7 @@ public int _native_GetMapValueVector(Handle plugin, int numParams) return 1; } -public int _native_GetMapValueString(Handle plugin, int numParams) +static int _native_GetMapValueString(Handle plugin, int numParams) { int iLen = 0; GetNativeStringLength(1, iLen); @@ -496,7 +496,7 @@ public int _native_GetMapValueString(Handle plugin, int numParams) return 1; } -public int _native_CopyMapSubsection(Handle plugin, int numParams) +static int _native_CopyMapSubsection(Handle plugin, int numParams) { int iLen = 0; GetNativeStringLength(2, iLen); diff --git a/addons/sourcemod/scripting/confoglcompmod/PasswordSystem.sp b/addons/sourcemod/scripting/confoglcompmod/PasswordSystem.sp index 8ab847d3e..630b77267 100644 --- a/addons/sourcemod/scripting/confoglcompmod/PasswordSystem.sp +++ b/addons/sourcemod/scripting/confoglcompmod/PasswordSystem.sp @@ -70,7 +70,7 @@ static void PS_CheckPassword(int client) CreateTimer(0.1, PS_CheckPassword_Timer, GetClientUserId(client), TIMER_REPEAT); } -public Action PS_CheckPassword_Timer(Handle hTimer, int userid) +static Action PS_CheckPassword_Timer(Handle hTimer, int userid) { int client = GetClientOfUserId(userid); @@ -87,7 +87,7 @@ public Action PS_CheckPassword_Timer(Handle hTimer, int userid) return Plugin_Stop; } -public void PS_ConVarDone(QueryCookie cookie, int client, ConVarQueryResult result, const char[] cvarName, const char[] cvarValue, int userid) +static void PS_ConVarDone(QueryCookie cookie, int client, ConVarQueryResult result, const char[] cvarName, const char[] cvarValue, int userid) { if (result == ConVarQuery_Okay) { char buffer[128]; @@ -105,7 +105,7 @@ public void PS_ConVarDone(QueryCookie cookie, int client, ConVarQueryResult resu } } -public void PS_ConVarChange(ConVar convar, const char[] oldValue, const char[] newValue) +static void PS_ConVarChange(ConVar convar, const char[] oldValue, const char[] newValue) { PS_hPassword.GetString(PS_sPassword, sizeof(PS_sPassword)); @@ -117,7 +117,7 @@ public void PS_ConVarChange(ConVar convar, const char[] oldValue, const char[] n } } -public Action PS_SuppressDisconnectMsg(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static Action PS_SuppressDisconnectMsg(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (bDontBroadcast || !PS_bSuppress) { return Plugin_Continue; diff --git a/addons/sourcemod/scripting/confoglcompmod/ReqMatch.sp b/addons/sourcemod/scripting/confoglcompmod/ReqMatch.sp index 632f71157..45546f137 100644 --- a/addons/sourcemod/scripting/confoglcompmod/ReqMatch.sp +++ b/addons/sourcemod/scripting/confoglcompmod/ReqMatch.sp @@ -15,8 +15,8 @@ static bool RM_bIsMatchModeLoaded = false, RM_bIsAMatchActive = false, RM_bIsPluginsLoaded = false, - RM_bIsMapRestarted = false; - RM_bIsChangeLevelAvailable = false; + RM_bIsMapRestarted = false, + RM_bIsChangeLevelAvailable = false, RM_bIsChmatchRequest = false; static Handle @@ -104,10 +104,7 @@ void RM_OnModuleStart() } // ChangeLevel - if (LibraryExists("l4d2_changelevel")) - { - RM_bIsChangeLevelAvailable = true; - } + RM_bIsChangeLevelAvailable = LibraryExists("l4d2_changelevel"); } void RM_OnMapStart() @@ -297,7 +294,7 @@ static void RM_Match_Unload(bool bForced = false) } } -public Action RM_Match_MapRestart_Timer(Handle hTimer, DataPack hDp) +static Action RM_Match_MapRestart_Timer(Handle hTimer, DataPack hDp) { ServerCommand("sm plugins load_lock"); // rework @@ -342,7 +339,7 @@ static bool RM_UpdateCfgOn(const char[] cfgfile, bool bIsPrint = true) return false; } -public Action RM_Cmd_ForceMatch(int client, int args) +static Action RM_Cmd_ForceMatch(int client, int args) { if (RM_bIsMatchModeLoaded) { @@ -416,7 +413,7 @@ public Action RM_Cmd_ForceMatch(int client, int args) return Plugin_Handled; } -public Action RM_Cmd_ResetMatch(int client, int args) +static Action RM_Cmd_ResetMatch(int client, int args) { if (!RM_bIsMatchModeLoaded) { @@ -433,7 +430,7 @@ public Action RM_Cmd_ResetMatch(int client, int args) return Plugin_Handled; } -public Action RM_CMD_ChangeMatch(int client, int args) +static Action RM_CMD_ChangeMatch(int client, int args) { if (args < 1) { @@ -506,7 +503,7 @@ public Action RM_CMD_ChangeMatch(int client, int args) return Plugin_Handled; } -public Action Timer_DelayToLoadMatchMode(Handle timer) +static Action Timer_DelayToLoadMatchMode(Handle timer) { // Load if (RM_bIsMatchModeLoaded) @@ -524,7 +521,7 @@ public Action Timer_DelayToLoadMatchMode(Handle timer) return Plugin_Handled; } -/*public Action RM_Cmd_Match(int client, int args) +/*static Action RM_Cmd_Match(int client, int args) { if (RM_bIsMatchModeLoaded || (!IsVersus() && !IsScavenge()) || !RM_hAllowVoting.BoolValue) { return Plugin_Handled; @@ -562,7 +559,7 @@ public Action Timer_DelayToLoadMatchMode(Handle timer) return Plugin_Handled; } -public Action RM_MatchRequestTimeout(Handle hTimer) +static Action RM_MatchRequestTimeout(Handle hTimer) { RM_ResetMatchRequest(); @@ -579,7 +576,7 @@ void RM_OnClientDisconnect(int client) CreateTimer(RESETMINTIME, RM_MatchResetTimer); } -public Action RM_MatchResetTimer(Handle hTimer) +static Action RM_MatchResetTimer(Handle hTimer) { RM_Match_Unload(); @@ -599,7 +596,7 @@ stock bool IsAMatchActive() return RM_bIsAMatchActive; } -public int native_IsMatchModeLoaded(Handle plugin, int numParams) +static int native_IsMatchModeLoaded(Handle plugin, int numParams) { return RM_bIsMatchModeLoaded; } diff --git a/addons/sourcemod/scripting/confoglcompmod/ScoreMod.sp b/addons/sourcemod/scripting/confoglcompmod/ScoreMod.sp index fdf845f37..dad553ecc 100644 --- a/addons/sourcemod/scripting/confoglcompmod/ScoreMod.sp +++ b/addons/sourcemod/scripting/confoglcompmod/ScoreMod.sp @@ -137,7 +137,7 @@ void SM_OnMapStart() SM_fTempMulti[2] = SM_hTempMulti2.FloatValue; } -public void SM_ConVarChanged_Enable(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void SM_ConVarChanged_Enable(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { if (StringToInt(sNewValue) == 0) { PluginDisable(); @@ -148,32 +148,32 @@ public void SM_ConVarChanged_Enable(ConVar hConVar, const char[] sOldValue, cons } } -public void SM_ConVarChanged_TempMulti0(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void SM_ConVarChanged_TempMulti0(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { SM_fTempMulti[0] = StringToFloat(sNewValue); } -public void SM_ConVarChanged_TempMulti1(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void SM_ConVarChanged_TempMulti1(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { SM_fTempMulti[1] = StringToFloat(sNewValue); } -public void SM_ConVarChanged_TempMulti2(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void SM_ConVarChanged_TempMulti2(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { SM_fTempMulti[2] = StringToFloat(sNewValue); } -public void SM_CVChanged_HealthBonusRatio(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void SM_CVChanged_HealthBonusRatio(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { SM_fHBRatio = StringToFloat(sNewValue); } -public void SM_CVChanged_SurvivalBonusRatio(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void SM_CVChanged_SurvivalBonusRatio(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { SM_fSurvivalBonusRatio = StringToFloat(sNewValue); } -public void SM_ConVarChanged_Health(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void SM_ConVarChanged_Health(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { SM_fHealPercent = SM_hHealPercent.FloatValue; SM_iPillPercent = SM_hPillPercent.IntValue; @@ -241,7 +241,7 @@ static void PluginDisable(bool unhook = true) SM_bHooked = false; } -public void SM_DoorClose_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void SM_DoorClose_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!SM_bModuleIsEnabled || !IsPluginEnabled() || !hEvent.GetBool("checkpoint")) { return; @@ -250,7 +250,7 @@ public void SM_DoorClose_Event(Event hEvent, const char[] sEventName, bool bDont SM_hSurvivalBonus.SetInt(SM_CalculateSurvivalBonus()); } -public void SM_PlayerDeath_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void SM_PlayerDeath_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!SM_bModuleIsEnabled || !IsPluginEnabled()) { return; @@ -264,7 +264,7 @@ public void SM_PlayerDeath_Event(Event hEvent, const char[] sEventName, bool bDo } } -public void SM_RoundEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void SM_RoundEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!SM_bModuleIsEnabled || !IsPluginEnabled()) { return; @@ -307,7 +307,7 @@ public void SM_RoundEnd_Event(Event hEvent, const char[] sEventName, bool bDontB } } -public void SM_RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void SM_RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!SM_bModuleIsEnabled || !IsPluginEnabled() || !SM_bIsFirstRoundOver) { return; @@ -317,7 +317,7 @@ public void SM_RoundStart_Event(Event hEvent, const char[] sEventName, bool bDon SM_bIsSecondRoundStarted = true; } -public void SM_FinaleVehicleLeaving_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void SM_FinaleVehicleLeaving_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!SM_bModuleIsEnabled || !IsPluginEnabled()) { return; @@ -326,7 +326,7 @@ public void SM_FinaleVehicleLeaving_Event(Event hEvent, const char[] sEventName, SM_hSurvivalBonus.SetInt(SM_CalculateSurvivalBonus()); } -public Action SM_Cmd_Health(int client, int args) +static Action SM_Cmd_Health(int client, int args) { if (!SM_bModuleIsEnabled || !IsPluginEnabled()) { return Plugin_Handled; @@ -472,7 +472,7 @@ static float SM_CalculateAvgHealth(int &iAliveCount = 0) return fAvgHealth; } -/*public Action SM_Command_Say(int iClient, const char[] sCommand, int iArgc) +/*static Action SM_Command_Say(int iClient, const char[] sCommand, int iArgc) { if (iClient == 0 || !SM_bModuleIsEnabled || !IsPluginEnabled()) { return Plugin_Continue; @@ -501,12 +501,12 @@ static int SM_CalculateScore() return RoundToFloor(fScore * SM_fMapMulti * SM_fHBRatio + 400 * SM_fMapMulti * SM_fSurvivalBonusRatio) * iAliveCount; } -public int Native_IsScoremodEnabled(Handle plugin, int numParams) +static int Native_IsScoremodEnabled(Handle plugin, int numParams) { return (SM_bModuleIsEnabled && IsPluginEnabled()); } -public int Native_GetScoremodBonus(Handle plugin, int numParams) +static int Native_GetScoremodBonus(Handle plugin, int numParams) { if (!SM_bModuleIsEnabled || !IsPluginEnabled()) { return -1; diff --git a/addons/sourcemod/scripting/confoglcompmod/UnprohibitBosses.sp b/addons/sourcemod/scripting/confoglcompmod/UnprohibitBosses.sp index 41d334c70..d928cb6ea 100644 --- a/addons/sourcemod/scripting/confoglcompmod/UnprohibitBosses.sp +++ b/addons/sourcemod/scripting/confoglcompmod/UnprohibitBosses.sp @@ -19,7 +19,7 @@ void UB_OnModuleStart() UB_hEnable.AddChangeHook(UB_ConVarChange); } -public void UB_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void UB_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { UB_bEnabled = UB_hEnable.BoolValue; } diff --git a/addons/sourcemod/scripting/confoglcompmod/UnreserveLobby.sp b/addons/sourcemod/scripting/confoglcompmod/UnreserveLobby.sp index 650356a3a..2d154a78c 100644 --- a/addons/sourcemod/scripting/confoglcompmod/UnreserveLobby.sp +++ b/addons/sourcemod/scripting/confoglcompmod/UnreserveLobby.sp @@ -27,7 +27,7 @@ void UL_OnClientPutInServer() L4D_LobbyUnreserve(); } -public Action UL_KillLobbyRes(int client, int args) +static Action UL_KillLobbyRes(int client, int args) { L4D_LobbyUnreserve(); ReplyToCommand(client, "[Confogl] Removed lobby reservation."); diff --git a/addons/sourcemod/scripting/confoglcompmod/WaterSlowdown.sp b/addons/sourcemod/scripting/confoglcompmod/WaterSlowdown.sp index ad5565270..0b89b5ca5 100644 --- a/addons/sourcemod/scripting/confoglcompmod/WaterSlowdown.sp +++ b/addons/sourcemod/scripting/confoglcompmod/WaterSlowdown.sp @@ -33,12 +33,12 @@ void WS_OnModuleStart() HookEvent("jockey_ride_end", WS_JockeyRideEnd); } -public void WS_FactorConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void WS_FactorConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { WS_fSlowdownFactor = WS_hFactor.FloatValue; } -public void WS_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void WS_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { WS_SetStatus(); } @@ -84,12 +84,12 @@ void WS_OnGameFrame() } } -public void WS_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void WS_RoundStart(Event hEvent, const char[] sEventName, bool bDontBroadcast) { WS_SetStatus(); } -public void WS_JockeyRide(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void WS_JockeyRide(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int victim = GetClientOfUserId(hEvent.GetInt("victim")); int jockey = GetClientOfUserId(hEvent.GetInt("userid")); @@ -103,7 +103,7 @@ public void WS_JockeyRide(Event hEvent, const char[] sEventName, bool bDontBroad } } -public void WS_JockeyRideEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void WS_JockeyRideEnd(Event hEvent, const char[] sEventName, bool bDontBroadcast) { int jockey = GetClientOfUserId(hEvent.GetInt("userid")); diff --git a/addons/sourcemod/scripting/confoglcompmod/WeaponCustomization.sp b/addons/sourcemod/scripting/confoglcompmod/WeaponCustomization.sp index 769222f87..1ae120bb0 100644 --- a/addons/sourcemod/scripting/confoglcompmod/WeaponCustomization.sp +++ b/addons/sourcemod/scripting/confoglcompmod/WeaponCustomization.sp @@ -36,12 +36,12 @@ void WC_OnModuleStart() HookEvent("weapon_drop", WC_WeaponDrop_Event); } -public void WC_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void WC_ConVarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { WC_iLimitCount = WC_hLimitCount.IntValue; } -public void WC_WeaponDrop_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void WC_WeaponDrop_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!IsPluginEnabled()) { return; @@ -52,7 +52,7 @@ public void WC_WeaponDrop_Event(Event hEvent, const char[] sEventName, bool bDon hEvent.GetString("item", WC_sLastWeapon, sizeof(WC_sLastWeapon)); } -public void WC_PlayerUse_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void WC_PlayerUse_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!IsPluginEnabled()) { return; diff --git a/addons/sourcemod/scripting/confoglcompmod/WeaponInformation.sp b/addons/sourcemod/scripting/confoglcompmod/WeaponInformation.sp index 933a6cc3f..507034fa5 100644 --- a/addons/sourcemod/scripting/confoglcompmod/WeaponInformation.sp +++ b/addons/sourcemod/scripting/confoglcompmod/WeaponInformation.sp @@ -634,7 +634,7 @@ static void ConVarsInType() Weapon_bRemoveExtraItems = Weapon_hRemoveExtraItems.BoolValue; } -public void WI_ConvarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) +static void WI_ConvarChange(ConVar hConVar, const char[] sOldValue, const char[] sNewValue) { for (int index = FIRST_WEAPON; index < NUM_OF_WEAPONS; index++) { if (Weapon_hConvar[index] == null) { @@ -1203,17 +1203,17 @@ static void WI_GetMapInfo() Weapon_bUpdateMapInfo = false; } -public void WI_RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void WI_RoundStart_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { CreateTimer(0.3, WI_RoundStartLoop, _, TIMER_FLAG_NO_MAPCHANGE); } -public void WI_RoundEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void WI_RoundEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { Weapon_bUpdateMapInfo = true; } -public Action WI_RoundStartLoop(Handle hTimer) +static Action WI_RoundStartLoop(Handle hTimer) { if (!IsPluginEnabled()) { return Plugin_Stop; @@ -1276,7 +1276,7 @@ public Action WI_RoundStartLoop(Handle hTimer) return Plugin_Stop; } -public void WI_SpawnerGiveItem_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void WI_SpawnerGiveItem_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { if (!IsPluginEnabled()) { return; diff --git a/addons/sourcemod/scripting/confoglcompmod/includes/configs.sp b/addons/sourcemod/scripting/confoglcompmod/includes/configs.sp index 821265e91..ddeea0673 100644 --- a/addons/sourcemod/scripting/confoglcompmod/includes/configs.sp +++ b/addons/sourcemod/scripting/confoglcompmod/includes/configs.sp @@ -146,7 +146,7 @@ void ExecuteCfg(const char[] sFileName) } } -public int _native_BuildConfigPath(Handle plugin, int numParams) +static int _native_BuildConfigPath(Handle plugin, int numParams) { int iLen = 0; GetNativeStringLength(3, iLen); @@ -164,7 +164,7 @@ public int _native_BuildConfigPath(Handle plugin, int numParams) return 1; } -public int _native_ExecConfigCfg(Handle plugin, int numParams) +static int _native_ExecConfigCfg(Handle plugin, int numParams) { int iLen = 0; GetNativeStringLength(1, iLen); @@ -178,7 +178,7 @@ public int _native_ExecConfigCfg(Handle plugin, int numParams) return 1; } -public int _native_GetConfigName(Handle plugin, int numParams) +static int _native_GetConfigName(Handle plugin, int numParams) { SetNativeString(1, customCfgName, GetNativeCell(2), true); return 1; diff --git a/addons/sourcemod/scripting/confoglcompmod/includes/customtags.sp b/addons/sourcemod/scripting/confoglcompmod/includes/customtags.sp index df0d0cc7f..7c84646b6 100644 --- a/addons/sourcemod/scripting/confoglcompmod/includes/customtags.sp +++ b/addons/sourcemod/scripting/confoglcompmod/includes/customtags.sp @@ -87,7 +87,7 @@ stock void RemoveCustomServerTag(const char[] tag) sv_tags.Flags = flags; } -public void OnTagsChanged(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) +static void OnTagsChanged(ConVar hConvar, const char[] sOldValue, const char[] sNewValue) { if (ignore_next_change) { // we fired this callback, no need to reapply tags diff --git a/addons/sourcemod/scripting/confoglcompmod/includes/survivorindex.sp b/addons/sourcemod/scripting/confoglcompmod/includes/survivorindex.sp index 74e28e0cb..22ea5ad39 100644 --- a/addons/sourcemod/scripting/confoglcompmod/includes/survivorindex.sp +++ b/addons/sourcemod/scripting/confoglcompmod/includes/survivorindex.sp @@ -60,19 +60,19 @@ static void SI_BuildIndex() } } -public void SI_BuildIndexDelay_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void SI_BuildIndexDelay_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { CreateTimer(0.3, SI_BuildIndex_Timer, _, TIMER_FLAG_NO_MAPCHANGE); } -public Action SI_BuildIndex_Timer(Handle hTimer) +static Action SI_BuildIndex_Timer(Handle hTimer) { SI_BuildIndex(); return Plugin_Stop; } -public void SI_BuildIndex_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) +static void SI_BuildIndex_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) { SI_BuildIndex(); }