reworking for a third or fourth time the special map case to work for mako race mode. special zones got special names. when not special stage on special map do normal zones work. when special stage on special map are the normal zones disabled

This commit is contained in:
jenz
2026-10-18 22:32:39 +02:00
parent 847181ff18
commit 9ed37c2bcf
3 changed files with 46 additions and 29 deletions
@@ -277,6 +277,7 @@ public void OnMapStart()
GetCurrentMap(g_cMapname, sizeof(g_cMapname));
Format(g_cSpecialMapStart, sizeof(g_cSpecialMapStart), "");
Format(g_cSpecialMapEnd, sizeof(g_cSpecialMapEnd), "");
g_hCurrentMapClientRecords.Clear();
g_hCurrentMapAllTopRecords.Clear();
@@ -693,9 +694,20 @@ public void unloze_zoneEntry(int client, char[] zone)
return;
}
int zoneIndex = RetrieveZoneIndex(zone);
int race_zone_count = GetTotalRaceZones();
if (!(StrEqual(zone, g_cSpecialMapEnd)) && !race_zone_count)
//no race zones. Its also not a special round on a map (mako race mode) where the only zones have unusual names (like MAKO_RACE)
if (!GetTotalRaceZones() && strlen(g_cSpecialMapStart) == 0)
{
return;
}
if (!StrEqual(zone, g_cSpecialMapEnd) && !GetTotalRaceZones())
return;
//it is a race mode on a special map, so disable the normal racezones.
if (strlen(g_cSpecialMapStart) != 0 && !StrEqual(zone, g_cSpecialMapEnd))
{
return;
}
int l_iZoneCount = unloze_zoneCount();
@@ -728,14 +740,22 @@ public void unloze_zoneLeave(int client, char[] zone)
{
return;
}
int race_zone_count = GetTotalRaceZones();
if (!(StrEqual(zone, g_cSpecialMapStart)) && !race_zone_count)
//no race zones. Its also not a special round on a map (mako race mode) where the only zones have unusual names (like MAKO_RACE)
if (!GetTotalRaceZones() && strlen(g_cSpecialMapStart) == 0)
{
return;
}
//it is right now a special map that is doing a special round so we disable the normal race timers from running
if (strlen(g_cSpecialMapStart) != 0 && !StrEqual(zone, g_cSpecialMapStart))
{
return;
}
if (GetClientTeam(client) == CS_TEAM_CT)
{
//a normal zone or the special map condition for race zone on one stage of a map
if ((StrContains(zone, "ZONE_PREFIX_START") > -1) || StrEqual(zone, g_cSpecialMapStart))
{
if (!PM_IsPlayerSteam(client))