Fixed infect timers not properly destroyed when the map is changed.

This commit is contained in:
Richard Helgeby 2012-05-29 23:40:32 +02:00
parent 1a4951ad0c
commit 88bb7f514c
2 changed files with 7 additions and 7 deletions

View File

@ -179,7 +179,6 @@ public OnMapStart()
ClassOnMapStart();
OverlaysOnMapStart();
RoundEndOnMapStart();
InfectOnMapStart();
SEffectsOnMapStart();
ZSpawnOnMapStart();
VolInit();
@ -191,6 +190,7 @@ public OnMapStart()
public OnMapEnd()
{
// Forward event to modules.
InfectOnMapEnd();
VolOnMapEnd();
VEffectsOnMapEnd();
}

View File

@ -74,14 +74,14 @@ new bool:bZombie[MAXPLAYERS + 1];
new bool:bInfectImmune[MAXPLAYERS + 1][2];
/**
* Map is starting.
* Map is ending.
*/
InfectOnMapStart()
InfectOnMapEnd()
{
// Reset timer handles. Infect timers are invalidated on a map change if
// they are still running, so these handles no longer point to valid timers.
tInfect = INVALID_HANDLE;
tInfectCountdown = INVALID_HANDLE;
// Reset timers. Infect timers are invalidated on a map change if they are
// still running.
ZREndTimer(tInfect);
ZREndTimer(tInfectCountdown);
}
/**