Fixed infect timers not properly destroyed when the map is changed.
This commit is contained in:
parent
1a4951ad0c
commit
88bb7f514c
@ -179,7 +179,6 @@ public OnMapStart()
|
|||||||
ClassOnMapStart();
|
ClassOnMapStart();
|
||||||
OverlaysOnMapStart();
|
OverlaysOnMapStart();
|
||||||
RoundEndOnMapStart();
|
RoundEndOnMapStart();
|
||||||
InfectOnMapStart();
|
|
||||||
SEffectsOnMapStart();
|
SEffectsOnMapStart();
|
||||||
ZSpawnOnMapStart();
|
ZSpawnOnMapStart();
|
||||||
VolInit();
|
VolInit();
|
||||||
@ -191,6 +190,7 @@ public OnMapStart()
|
|||||||
public OnMapEnd()
|
public OnMapEnd()
|
||||||
{
|
{
|
||||||
// Forward event to modules.
|
// Forward event to modules.
|
||||||
|
InfectOnMapEnd();
|
||||||
VolOnMapEnd();
|
VolOnMapEnd();
|
||||||
VEffectsOnMapEnd();
|
VEffectsOnMapEnd();
|
||||||
}
|
}
|
||||||
|
@ -74,14 +74,14 @@ new bool:bZombie[MAXPLAYERS + 1];
|
|||||||
new bool:bInfectImmune[MAXPLAYERS + 1][2];
|
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
|
// 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user