mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Added replay bot integration with bhopstats.
This commit is contained in:
parent
b67edfcea0
commit
bb44534c93
@ -45,6 +45,7 @@ bool gB_Sounds = false;
|
|||||||
int gI_Cycle = 0;
|
int gI_Cycle = 0;
|
||||||
int gI_GradientColors[3];
|
int gI_GradientColors[3];
|
||||||
int gI_GradientDirection = -1;
|
int gI_GradientDirection = -1;
|
||||||
|
int gI_Styles = 0;
|
||||||
|
|
||||||
Handle gH_HUDCookie = null;
|
Handle gH_HUDCookie = null;
|
||||||
int gI_HUDSettings[MAXPLAYERS+1];
|
int gI_HUDSettings[MAXPLAYERS+1];
|
||||||
@ -139,9 +140,14 @@ public void OnPluginStart()
|
|||||||
{
|
{
|
||||||
for(int i = 1; i <= MaxClients; i++)
|
for(int i = 1; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
if(IsValidClient(i) && AreClientCookiesCached(i))
|
if(IsValidClient(i))
|
||||||
{
|
{
|
||||||
OnClientCookiesCached(i);
|
OnClientPutInServer(i);
|
||||||
|
|
||||||
|
if(AreClientCookiesCached(i))
|
||||||
|
{
|
||||||
|
OnClientCookiesCached(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,6 +229,8 @@ public void Shavit_OnStyleConfigLoaded(int styles)
|
|||||||
styles = Shavit_GetStyleCount();
|
styles = Shavit_GetStyleCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gI_Styles = styles;
|
||||||
|
|
||||||
for(int i = 0; i < styles; i++)
|
for(int i = 0; i < styles; i++)
|
||||||
{
|
{
|
||||||
Shavit_GetStyleSettings(i, gA_StyleSettings[i]);
|
Shavit_GetStyleSettings(i, gA_StyleSettings[i]);
|
||||||
@ -825,25 +833,7 @@ public void Bunnyhop_OnTouchGround(int client)
|
|||||||
|
|
||||||
public void Bunnyhop_OnJumpPressed(int client)
|
public void Bunnyhop_OnJumpPressed(int client)
|
||||||
{
|
{
|
||||||
if(gEV_Type != Engine_CSS)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
gI_ScrollCount[client] = BunnyhopStats.GetScrollCount(client);
|
gI_ScrollCount[client] = BunnyhopStats.GetScrollCount(client);
|
||||||
|
|
||||||
if(gA_StyleSettings[gBS_Style[client]][bAutobhop])
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i = 1; i <= MaxClients; i++)
|
|
||||||
{
|
|
||||||
if(i == client || (IsValidClient(i) && GetHUDTarget(i) == client))
|
|
||||||
{
|
|
||||||
UpdateCenterKeys(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateCenterKeys(int client)
|
void UpdateCenterKeys(int client)
|
||||||
@ -868,7 +858,14 @@ void UpdateCenterKeys(int client)
|
|||||||
(buttons & IN_FORWARD) > 0? "W":"ー", (buttons & IN_MOVELEFT) > 0? "A":"ー",
|
(buttons & IN_FORWARD) > 0? "W":"ー", (buttons & IN_MOVELEFT) > 0? "A":"ー",
|
||||||
(buttons & IN_BACK) > 0? "S":"ー", (buttons & IN_MOVERIGHT) > 0? "D":"ー");
|
(buttons & IN_BACK) > 0? "S":"ー", (buttons & IN_MOVERIGHT) > 0? "D":"ー");
|
||||||
|
|
||||||
if(gB_BhopStats && !gA_StyleSettings[gBS_Style[target]][bAutobhop])
|
int style = (IsFakeClient(target))? Shavit_GetReplayBotStyle(target):gBS_Style[target];
|
||||||
|
|
||||||
|
if(style < 0 || style > gI_Styles)
|
||||||
|
{
|
||||||
|
style = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(gB_BhopStats && !gA_StyleSettings[style][bAutobhop])
|
||||||
{
|
{
|
||||||
Format(sCenterText, 64, "%s\n %d %d", sCenterText, gI_ScrollCount[target], gI_LastScrollCount[target]);
|
Format(sCenterText, 64, "%s\n %d %d", sCenterText, gI_ScrollCount[target], gI_LastScrollCount[target]);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user