Fixed infect timers not completely destroyed on map change. This will possibly fix the memory leak.

This commit is contained in:
Richard Helgeby 2012-05-29 23:29:13 +02:00
parent 1a4951ad0c
commit 7faed61def
2 changed files with 6 additions and 5 deletions

View File

@ -191,6 +191,7 @@ public OnMapStart()
public OnMapEnd() public OnMapEnd()
{ {
// Forward event to modules. // Forward event to modules.
InfectOnMapEnd();
VolOnMapEnd(); VolOnMapEnd();
VEffectsOnMapEnd(); VEffectsOnMapEnd();
} }

View File

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