mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-07 12:13:20 +00:00
l4d2_extrafinaletanks: Do not run on last stand
This commit is contained in:
parent
c57b39180c
commit
1369a84a09
2 changed files with 8 additions and 3 deletions
|
@ -9,8 +9,6 @@
|
|||
#include <sdktools>
|
||||
#include <left4dhooks>
|
||||
|
||||
//#include <sdkhooks>
|
||||
|
||||
public ConVar hExtraChance, hExtraCount;
|
||||
|
||||
public Plugin myinfo =
|
||||
|
@ -50,6 +48,7 @@ static int extraTanksCount = 0;
|
|||
4 -> all extras spawned, waiting on death
|
||||
*/
|
||||
public Action L4D2_OnChangeFinaleStage(int &finaleType, const char[] arg) {
|
||||
if(hExtraChance.FloatValue == 0.0 || extraTankStage == -1) return Plugin_Continue;
|
||||
if(finaleType == 8 && extraTankStage <= 1) {
|
||||
extraTankStage++;
|
||||
return Plugin_Continue;
|
||||
|
@ -74,10 +73,16 @@ public Action Event_TankSpawn(Event event, const char[] name, bool dontBroadcast
|
|||
}
|
||||
public Action Event_TankKilled(Event event, const char[] name, bool dontBroadcast) {
|
||||
if(extraTankStage == 4 && --extraTanksCount == 0) {
|
||||
L4D2_ChangeFinaleStage(10, "extratankdeath");
|
||||
L4D2_ForceNextStage();
|
||||
extraTankStage = 0;
|
||||
}
|
||||
}
|
||||
public void OnMapStart() {
|
||||
char map[32];
|
||||
GetCurrentMap(map, sizeof(map));
|
||||
extraTankStage = StrEqual(map, "c14m2_lighthouse") ? -1 : 0;
|
||||
extraTanksCount = 0;
|
||||
}
|
||||
|
||||
#if defined DEBUG
|
||||
public Action Timer_ShowFinale(Handle h) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue