trying to avoid bot running over edge and trying to prevent query bugging timer
This commit is contained in:
parent
fb6e8d9166
commit
7b920741ea
@ -316,10 +316,7 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
|
||||
GetVectorAngles(Result, Result);
|
||||
TeleportEntity(client, NULL_VECTOR, Result, NULL_VECTOR);
|
||||
bot_avoid_edge[client] = 0;
|
||||
ApplyBoost(client, 500.0, Result);
|
||||
buttons_old[client] = buttons;
|
||||
flags_old[client] = flags;
|
||||
return;
|
||||
ApplyBoost(client, 400.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -331,8 +328,9 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyBoost(int client, float amount, float vel[3]){
|
||||
float direction[3];
|
||||
void ApplyBoost(int client, float amount){
|
||||
float direction[3], vel[3];
|
||||
GetEntPropVector(client, Prop_Data, "m_vecVelocity", vel);
|
||||
NormalizeVector(vel, direction);
|
||||
ScaleVector(direction, amount);
|
||||
AddVectors(vel, direction, vel);
|
||||
|
@ -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