mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
add bot stuff to cronjob (#113)
This commit is contained in:
parent
93a95bb82c
commit
0368938068
@ -170,6 +170,11 @@ public Action Cron(Handle Timer)
|
|||||||
for(int i = 0; i < MAX_STYLES; i++)
|
for(int i = 0; i < MAX_STYLES; i++)
|
||||||
{
|
{
|
||||||
Shavit_GetWRTime(view_as<BhopStyle>(i), fWRTimes[i]);
|
Shavit_GetWRTime(view_as<BhopStyle>(i), fWRTimes[i]);
|
||||||
|
|
||||||
|
if(gI_ReplayBotClient[i] != 0)
|
||||||
|
{
|
||||||
|
UpdateReplayInfo(gI_ReplayBotClient[i], view_as<BhopStyle>(i), fWRTimes[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 1; i <= MaxClients; i++)
|
for(int i = 1; i <= MaxClients; i++)
|
||||||
@ -423,8 +428,6 @@ public bool DeleteReplay(BhopStyle style)
|
|||||||
gI_FrameCount[style] = 0;
|
gI_FrameCount[style] = 0;
|
||||||
gI_ReplayTick[style] = -1;
|
gI_ReplayTick[style] = -1;
|
||||||
|
|
||||||
CreateTimer(gCV_ReplayDelay.FloatValue / 2, EndReplay, style, TIMER_FLAG_NO_MAPCHANGE);
|
|
||||||
|
|
||||||
if(gI_ReplayBotClient[style] != 0)
|
if(gI_ReplayBotClient[style] != 0)
|
||||||
{
|
{
|
||||||
UpdateReplayInfo(gI_ReplayBotClient[style], style, 0.0);
|
UpdateReplayInfo(gI_ReplayBotClient[style], style, 0.0);
|
||||||
@ -508,16 +511,20 @@ public void UpdateReplayInfo(int client, BhopStyle style, float time)
|
|||||||
gB_HideNameChange = true;
|
gB_HideNameChange = true;
|
||||||
SetClientName(client, sName);
|
SetClientName(client, sName);
|
||||||
|
|
||||||
|
int iScore = (gI_FrameCount[style] > 0)? 2000:1999;
|
||||||
|
|
||||||
if(gSG_Type == Game_CSGO)
|
if(gSG_Type == Game_CSGO)
|
||||||
{
|
{
|
||||||
CS_SetClientContributionScore(client, 2000);
|
CS_SetClientContributionScore(client, iScore);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetEntProp(client, Prop_Data, "m_iFrags", 2000);
|
SetEntProp(client, Prop_Data, "m_iFrags", iScore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetEntProp(client, Prop_Data, "m_iDeaths", 0);
|
||||||
|
|
||||||
gB_DontCallTimer = true;
|
gB_DontCallTimer = true;
|
||||||
|
|
||||||
if((gI_FrameCount[style] == 0 || fWRTime == 0.0))
|
if((gI_FrameCount[style] == 0 || fWRTime == 0.0))
|
||||||
@ -616,6 +623,7 @@ public void Shavit_OnWorldRecord(int client, BhopStyle style, float time)
|
|||||||
if(gI_ReplayBotClient[style] != 0)
|
if(gI_ReplayBotClient[style] != 0)
|
||||||
{
|
{
|
||||||
UpdateReplayInfo(gI_ReplayBotClient[style], style, time);
|
UpdateReplayInfo(gI_ReplayBotClient[style], style, time);
|
||||||
|
CS_RespawnPlayer(gI_ReplayBotClient[style]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user