Fixed infect timers not completely destroyed on map change. This will possibly fix the memory leak.
This commit is contained in:
parent
1a4951ad0c
commit
7faed61def
@ -191,6 +191,7 @@ public OnMapStart()
|
||||
public OnMapEnd()
|
||||
{
|
||||
// Forward event to modules.
|
||||
InfectOnMapEnd();
|
||||
VolOnMapEnd();
|
||||
VEffectsOnMapEnd();
|
||||
}
|
||||
|
@ -76,12 +76,12 @@ new bool:bInfectImmune[MAXPLAYERS + 1][2];
|
||||
/**
|
||||
* Map is starting.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user