fix previous turf issue

This commit is contained in:
Lorenc Pekaj 2019-02-18 00:29:53 +11:00
parent 08131d4e92
commit 7c784f8d3f

View File

@ -321,8 +321,15 @@ hook OnServerGameDayEnd( )
} }
} }
// get previous turf
new previous_turf = Iter_Prev( gangzoneturfs, g_gangHardpointTurf );
if ( previous_turf >= Iter_Last( gangzoneturfs ) ) {
previous_turf = INVALID_GANG_TURF;
}
// reset hardpoint // reset hardpoint
g_gangHardpointPreviousTurf = Iter_Prev( gangzoneturfs, g_gangHardpointTurf ); g_gangHardpointPreviousTurf = previous_turf;
g_gangHardpointTurf = INVALID_GANG_TURF; g_gangHardpointTurf = INVALID_GANG_TURF;
g_weekAveragePlayers = 0.0; g_weekAveragePlayers = 0.0;
g_weekSecondsElapsed = 0.0; g_weekSecondsElapsed = 0.0;