diff --git a/addons/sourcemod/plugins/confoglcompmod.smx b/addons/sourcemod/plugins/confoglcompmod.smx index be180d3c0..d45b96641 100644 Binary files a/addons/sourcemod/plugins/confoglcompmod.smx and b/addons/sourcemod/plugins/confoglcompmod.smx differ diff --git a/addons/sourcemod/scripting/confoglcompmod.sp b/addons/sourcemod/scripting/confoglcompmod.sp index 0f6527198..892586fb5 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.3.1" +#define PLUGIN_VERSION "2.3.2" // Using these macros, you can disable unnecessary modules, // and they will not be included in the plugin at compile time, @@ -414,7 +414,7 @@ public Action L4D_OnSpawnTank(const float vector[3], const float qangle[3]) public void L4D_OnSpawnTank_Post(int client, const float vecPos[3], const float vecAng[3]) { //Modules - BS_OnTankSpawnPost_Forward(); //BossSpawning + BS_OnTankSpawnPost_Forward(client); //BossSpawning } #endif diff --git a/addons/sourcemod/scripting/confoglcompmod/BossSpawning.sp b/addons/sourcemod/scripting/confoglcompmod/BossSpawning.sp index 5a225f1d6..e10719d62 100644 --- a/addons/sourcemod/scripting/confoglcompmod/BossSpawning.sp +++ b/addons/sourcemod/scripting/confoglcompmod/BossSpawning.sp @@ -17,8 +17,7 @@ static bool BS_bEnabled = true, BS_bIsFirstRound = true, BS_bDeleteWitches = false, - BS_bFinaleStarted = false, - BS_bExpectTankSpawn = false; + BS_bFinaleStarted = false; static int BS_iTankCount[ROUND_MAX_COUNT] = {0, ...}, @@ -38,7 +37,6 @@ void BS_OnModuleStart() BS_bEnabled = BS_hEnabled.BoolValue; BS_hEnabled.AddChangeHook(BS_ConVarChange); - HookEvent("tank_spawn", BS_TankSpawn); HookEvent("witch_spawn", BS_WitchSpawn); HookEvent("round_end", BS_RoundEnd, EventHookMode_PostNoCopy); HookEvent("finale_start", BS_FinaleStart, EventHookMode_PostNoCopy); @@ -50,7 +48,6 @@ void BS_OnMapStart() { BS_bIsFirstRound = true; BS_bFinaleStarted = false; - BS_bExpectTankSpawn = false; for (int i = 0; i < ROUND_MAX_COUNT; i++) { BS_iTankCount[i] = 0; @@ -99,14 +96,7 @@ public void BS_WitchSpawn(Event hEvent, const char[] sEventName, bool bDontBroad } } -void BS_OnTankSpawnPost_Forward() -{ - if (BS_bEnabled && IsPluginEnabled()) { - BS_bExpectTankSpawn = true; - } -} - -public void BS_TankSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast) +void BS_OnTankSpawnPost_Forward(int iTankClient) { if (!BS_bEnabled || !IsPluginEnabled()) { return; @@ -117,20 +107,11 @@ public void BS_TankSpawn(Event hEvent, const char[] sEventName, bool bDontBroadc return; } - // Stop if this isn't the first tank_spawn for this tank - if (!BS_bExpectTankSpawn) { - return; - } - - BS_bExpectTankSpawn = false; - // Don't track tank spawns on c5m5 or tank can spawn behind other team. if (strcmp(BS_sMap, "c5m5_bridge") == 0) { return; } - int iTankClient = GetClientOfUserId(hEvent.GetInt("userid")); - if (GetMapValueInt("tank_z_fix")) { FixZDistance(iTankClient); // fix stuck tank spawns, ex c1m1 }