changed roundstart to reset differently

This commit is contained in:
jenz 2022-08-17 21:07:31 +02:00
parent 23cd40963c
commit c72b97c657

View File

@ -375,6 +375,7 @@ public void Event_RoundStart(Handle event, const char[] name, bool dontBroadcast
Format(g_cSpecialMapStart, sizeof(g_cSpecialMapStart), "");
Format(g_cSpecialMapEnd, sizeof(g_cSpecialMapEnd), "");
int race_zone_count = GetTotalRaceZones();
int l_iZoneCount = unloze_zoneCount();
if (!race_zone_count)
return;
for (int i = 1; i <= MaxClients; i++)
@ -386,18 +387,13 @@ public void Event_RoundStart(Handle event, const char[] name, bool dontBroadcast
char first_zone[512];
ZoneNameBasedOnIndex(0, first_zone);
g_bClient_allowed_to_leave_again[i] = true;
if (race_zone_count != 1)
g_bHumansAllowedTime[i] = false;
else if (StrContains(first_zone, "ZONE_PREFIX_RACE") > -1) //ensures only one zone in total and that its the actual end zone
g_bHumansAllowedTime[i] = false;
if (l_iZoneCount == 1 && race_zone_count == 1)
{
g_bHumansAllowedTime[i] = true;
g_fStartTime[i] = GetEngineTime();
mysql_get_player_time(i, 0);
}
else
{
g_bHumansAllowedTime[i] = false;
}
}
}
//----------------------------------------------------------------------------------------------------