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:
@@ -1,15 +1,11 @@
|
||||
#if defined _unloze_racetimer_specialmaps_included_
|
||||
#endinput
|
||||
#endif
|
||||
#define _unloze_racetimer_specialmaps_included_
|
||||
|
||||
/**
|
||||
* Called on Every Round start to identify if special roundzones exist
|
||||
* @char resultStart returns name of special startzone
|
||||
* @char resultEnd returns name of special endzone
|
||||
*/
|
||||
forward void CheckIfSpecialRoundZones(char[] resultstart, char[] resultend);
|
||||
/**
|
||||
* @returns true if mako currently
|
||||
*/
|
||||
native bool unloze_gBSpecialMapDisplay();
|
||||
#if defined _unloze_racetimer_specialmaps_included_
|
||||
#endinput
|
||||
#endif
|
||||
#define _unloze_racetimer_specialmaps_included_
|
||||
|
||||
/**
|
||||
* Called on Every Round start to identify if special roundzones exist
|
||||
* @char resultStart returns name of special startzone
|
||||
* @char resultEnd returns name of special endzone
|
||||
*/
|
||||
forward void CheckIfSpecialRoundZones(char[] resultstart, char[] resultend);
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
#include <unloze_zones>
|
||||
#pragma newdecls required
|
||||
static Handle g_hSpecialRoundCheck;
|
||||
char g_cMapname[g_dIndex];
|
||||
bool g_bCurrentMapSpecialMako;
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
name = "unloze racetimer specialmaps",
|
||||
@@ -24,17 +25,16 @@ public Plugin myinfo =
|
||||
public APLRes AskPluginLoad2(Handle myself, bool late, char [] error, int err_max)
|
||||
{
|
||||
g_hSpecialRoundCheck = CreateGlobalForward("CheckIfSpecialRoundZones", ET_Ignore, Param_String, Param_String);
|
||||
CreateNative("unloze_gBSpecialMapDisplay", Native_Isspecialmap);
|
||||
return APLRes_Success;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public int Native_Isspecialmap(Handle handler, int numParams)
|
||||
|
||||
public void OnMapStart()
|
||||
{
|
||||
GetCurrentMap(g_cMapname, sizeof(g_cMapname));
|
||||
return view_as<bool>(StrEqual(g_cMapname, "ze_FFVII_Mako_Reactor_v5_3", false));
|
||||
char Mapname[256];
|
||||
GetCurrentMap(Mapname, sizeof(Mapname));
|
||||
g_bCurrentMapSpecialMako = view_as<bool>(StrEqual(Mapname, "ze_FFVII_Mako_Reactor_v5_3", false));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose: http://git.unloze.com/UNLOZE/sm-plugins/src/master/MakoVote/scripting/MakoVote.sp
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@@ -100,8 +100,7 @@ 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))
|
||||
if (g_bCurrentMapSpecialMako)
|
||||
{
|
||||
// == 11 means its racemode on mako
|
||||
if (GetCurrentStage() == 11)
|
||||
@@ -112,6 +111,7 @@ public Action Timer_CheckStage(Handle timer, any userid)
|
||||
//ZONE_PREFIX_MAKO_START_1
|
||||
//ZONE_PREFIX_MAKO_RACE_2
|
||||
Call_StartForward(g_hSpecialRoundCheck);
|
||||
|
||||
while (i < l_iZoneCount)
|
||||
{
|
||||
ZoneNameBasedOnIndex(i, l_cIndexName[i]);
|
||||
@@ -124,6 +124,7 @@ public Action Timer_CheckStage(Handle timer, any userid)
|
||||
Call_Finish();
|
||||
}
|
||||
}
|
||||
return Plugin_Handled;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
|
||||
Reference in New Issue
Block a user