updated so mako has its racezone back on racemode
This commit is contained in:
@@ -74,6 +74,7 @@ public void OnPluginStart()
|
||||
continue;
|
||||
OnClientCookiesCached(i);
|
||||
}
|
||||
g_bDisplaySpecial = unloze_gBSpecialMapDisplay();
|
||||
}
|
||||
|
||||
public void trigger_teleport(const char[] output, int entity_index, int client, float delay)
|
||||
@@ -214,23 +215,25 @@ public void SQL_FinishedQuery(Database db, DBResultSet results, const char[] err
|
||||
|
||||
public void OnMapStart()
|
||||
{
|
||||
if (!g_dDatabase)
|
||||
Database.Connect(SQL_OnDatabaseConnect, "racetimercss");
|
||||
else
|
||||
{
|
||||
static Handle hHostName;
|
||||
if((hHostName = FindConVar("hostname")) == INVALID_HANDLE)
|
||||
return;
|
||||
char line[g_dLength];
|
||||
GetConVarString(hHostName, line, sizeof(line));
|
||||
if (StrContains(line, "EVENT", false) > -1)
|
||||
g_bEventBool = true;
|
||||
else
|
||||
g_bEventBool = false;
|
||||
g_bDisplaySpecial = unloze_gBSpecialMapDisplay();
|
||||
GetCurrentMap(g_cMapname, sizeof(g_cMapname));
|
||||
startTimer();
|
||||
}
|
||||
if (!g_dDatabase)
|
||||
Database.Connect(SQL_OnDatabaseConnect, "racetimercss");
|
||||
else
|
||||
{
|
||||
static Handle hHostName;
|
||||
if((hHostName = FindConVar("hostname")) == INVALID_HANDLE)
|
||||
return;
|
||||
char line[g_dLength];
|
||||
GetConVarString(hHostName, line, sizeof(line));
|
||||
if (StrContains(line, "EVENT", false) > -1)
|
||||
g_bEventBool = true;
|
||||
else
|
||||
g_bEventBool = false;
|
||||
g_bDisplaySpecial = unloze_gBSpecialMapDisplay();
|
||||
GetCurrentMap(g_cMapname, sizeof(g_cMapname));
|
||||
startTimer();
|
||||
}
|
||||
Format(g_cSpecialMapStart, sizeof(g_cSpecialMapStart), "");
|
||||
Format(g_cSpecialMapEnd, sizeof(g_cSpecialMapEnd), "");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@@ -267,6 +270,8 @@ public void startTimer()
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
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();
|
||||
if (!race_zone_count)
|
||||
return;
|
||||
@@ -478,11 +483,11 @@ public void unloze_zoneEntry(int client, char[] zone)
|
||||
{
|
||||
int zoneIndex = RetrieveZoneIndex(zone);
|
||||
int race_zone_count = GetTotalRaceZones();
|
||||
if (!race_zone_count)
|
||||
if (!(StrEqual(zone, g_cSpecialMapEnd)) && !race_zone_count)
|
||||
return;
|
||||
int l_iZoneCount = unloze_zoneCount();
|
||||
|
||||
if (GetClientTeam(client) == CS_TEAM_CT && g_bHumansAllowedTime[client])
|
||||
if (GetClientTeam(client) == CS_TEAM_CT && (g_bHumansAllowedTime[client] || StrEqual(zone, g_cSpecialMapEnd)))
|
||||
{
|
||||
if ((StrContains(zone, "ZONE_PREFIX_RACE") > -1) || StrEqual(zone, g_cSpecialMapEnd))
|
||||
{
|
||||
@@ -523,7 +528,8 @@ public void unloze_zoneLeave(int client, char[] zone)
|
||||
{
|
||||
//only maps with multiple zones need ZONE_PREFIX_START
|
||||
int race_zone_count = GetTotalRaceZones();
|
||||
if (!race_zone_count || g_bAllowToLeave[client])
|
||||
//if zone has special name like in mako dont return despite g_bAllowToLeave being false or there being no normally named zone
|
||||
if (!(StrEqual(zone, g_cSpecialMapStart)) && (!race_zone_count || g_bAllowToLeave[client]))
|
||||
return;
|
||||
|
||||
if (GetClientTeam(client) == CS_TEAM_CT)
|
||||
@@ -560,8 +566,8 @@ public void unloze_zoneCreated()
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void CheckIfSpecialRoundZones(char[] resultstart, char[] resultend)
|
||||
{
|
||||
Format(g_cSpecialMapStart, sizeof(g_cSpecialMapStart), resultstart);
|
||||
Format(g_cSpecialMapEnd, sizeof(g_cSpecialMapEnd), resultend);
|
||||
Format(g_cSpecialMapStart, sizeof(g_cSpecialMapStart), resultstart);
|
||||
Format(g_cSpecialMapEnd, sizeof(g_cSpecialMapEnd), resultend);
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
|
||||
Reference in New Issue
Block a user