trying to avoid bot running over edge and trying to prevent query bugging timer
This commit is contained in:
parent
054ae4a60b
commit
1f227eb1f6
@ -115,7 +115,7 @@ public void MYSQLCheckMapEntry()
|
||||
char l_cZoneIndexName[g_dIndex][g_dLength];
|
||||
if (l_iZoneCount == 1)
|
||||
{
|
||||
Format(sQuery, sizeof(sQuery), "ALTER TABLE `zetimer_table` ADD COLUMN IF NOT EXISTS `%s` VARCHAR(12) DEFAULT '0.000' NOT NULL", g_cMapname);
|
||||
Format(sQuery, sizeof(sQuery), "ALTER TABLE `zetimer_table` ADD COLUMN IF NOT EXISTS `%s` TEXT DEFAULT '0.000' NOT NULL", g_cMapname);
|
||||
DataPack hDataPack = new DataPack();
|
||||
hDataPack.WriteString(sQuery);
|
||||
g_dDatabase.Query(SQL_FinishedQuery, sQuery, hDataPack, DBPrio_High);
|
||||
@ -127,7 +127,7 @@ public void MYSQLCheckMapEntry()
|
||||
if (IsCorrectZone(iterator, l_cZoneIndexName[iterator][g_dLength -1], "ZONE_PREFIX_RACE"))
|
||||
{
|
||||
l_iRaceCount++;
|
||||
Format(sQuery, sizeof(sQuery), "ALTER TABLE `zetimer_table` ADD COLUMN IF NOT EXISTS `%sS%i` VARCHAR(12) DEFAULT '0.000' NOT NULL", g_cMapname, l_iRaceCount);
|
||||
Format(sQuery, sizeof(sQuery), "ALTER TABLE `zetimer_table` ADD COLUMN IF NOT EXISTS `%sS%i` TEXT DEFAULT '0.000' NOT NULL", g_cMapname, l_iRaceCount);
|
||||
DataPack hDataPack = new DataPack();
|
||||
hDataPack.WriteString(sQuery);
|
||||
g_dDatabase.Query(SQL_FinishedQuery, sQuery, hDataPack, DBPrio_High);
|
||||
@ -407,8 +407,11 @@ public void unloze_zoneEntry(int client, char[] zone)
|
||||
public void unloze_zoneLeave(int client, char[] zone)
|
||||
{
|
||||
//only maps with multiple zones need ZONE_PREFIX_START
|
||||
int l_iZoneCount = unloze_zoneCount();
|
||||
if (((GetClientTeam(client) == CS_TEAM_CT) && StrContains(zone, "ZONE_PREFIX_START") > -1) || StrEqual(zone, g_cSpecialMapStart))
|
||||
{
|
||||
if (!l_iZoneCount)
|
||||
return;
|
||||
resetClientVectors(client);
|
||||
g_fStartTime[client] = GetEngineTime();
|
||||
float notRounded = float(RetrieveZoneIndex(zone));
|
||||
@ -528,9 +531,9 @@ public void FinishedStageRaceZone(int client)
|
||||
{
|
||||
CPrintToChat(client, "Your record: None yet\nCommand: !toptime !mytime !stages");
|
||||
if (l_iZoneCount < 2)
|
||||
Format(sQuery, sizeof(sQuery), "UPDATE `zetimer_table` SET `%s` = '%s', name = '%s' WHERE steam_auth = '%s'", g_cMapname, sTime, sEscapedName, sSID);
|
||||
Format(sQuery, sizeof(sQuery), "UPDATE unloze_racetimer_css.zetimer SET `%s` = '%s', name = '%s' WHERE steam_auth = '%s'", g_cMapname, sTime, sEscapedName, sSID);
|
||||
else
|
||||
Format(sQuery, sizeof(sQuery), "UPDATE `zetimer_table` SET `%sS%i` = '%s', name = '%s' WHERE steam_auth = '%s'", g_cMapname, stage, sTime, sEscapedName, sSID);
|
||||
Format(sQuery, sizeof(sQuery), "UPDATE unloze_racetimer_css.zetimer SET `%sS%i` = '%s', name = '%s' WHERE steam_auth = '%s'", g_cMapname, stage, sTime, sEscapedName, sSID);
|
||||
}
|
||||
else
|
||||
CPrintToChat(client, "Your record: %s\nCommand: !toptime !mytime !stages", g_csTime_record[client]);
|
||||
|
Loading…
Reference in New Issue
Block a user