now making sure the special map race zones on mako can exist despite other zones being present

This commit is contained in:
jenz
2026-10-18 15:23:23 +02:00
parent 778a2addbd
commit 847181ff18
2 changed files with 8 additions and 9 deletions
@@ -9,8 +9,6 @@
#include <unloze_zones>
#pragma newdecls required
static Handle g_hSpecialRoundCheck;
Handle g_hTimer_check_stage = null;
bool g_bCheckedRound;
char g_cMapname[g_dIndex];
public Plugin myinfo =
{
@@ -87,15 +85,12 @@ public void OnPluginEnd()
{
if (g_hSpecialRoundCheck != null)
delete g_hSpecialRoundCheck;
if (g_hTimer_check_stage != null)
delete g_hTimer_check_stage;
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void OnPluginStart()
{
g_hTimer_check_stage = CreateTimer(10.0, Timer_CheckStage, _, TIMER_REPEAT);
//hooks
HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);
@@ -106,9 +101,8 @@ public void OnPluginStart()
public Action Timer_CheckStage(Handle timer, any userid)
{
GetCurrentMap(g_cMapname, sizeof(g_cMapname));
if (StrEqual(g_cMapname, "ze_FFVII_Mako_Reactor_v5_3", false) && g_bCheckedRound)
if (StrEqual(g_cMapname, "ze_FFVII_Mako_Reactor_v5_3", false))
{
g_bCheckedRound = false;
// == 11 means its racemode on mako
if (GetCurrentStage() == 11)
{
@@ -121,7 +115,10 @@ public Action Timer_CheckStage(Handle timer, any userid)
while (i < l_iZoneCount)
{
ZoneNameBasedOnIndex(i, l_cIndexName[i]);
Call_PushString(l_cIndexName[i]);
if (StrContains(l_cIndexName[i], "MAKO", false) != -1)
{
Call_PushString(l_cIndexName[i]);
}
i++;
}
Call_Finish();
@@ -133,5 +130,5 @@ public Action Timer_CheckStage(Handle timer, any userid)
//----------------------------------------------------------------------------------------------------
public void Event_RoundStart(Handle event, const char[] name, bool dontBroadcast)
{
g_bCheckedRound = true;
CreateTimer(5.0, Timer_CheckStage, _);
}