random things

This commit is contained in:
rtldg 2022-07-20 15:58:18 +00:00
parent bf25061444
commit 898c46379d
3 changed files with 12 additions and 10 deletions

View File

@ -1329,7 +1329,7 @@ native float Shavit_GetMaxVelocity(int client);
native void Shavit_SetAvgVelocity(int client, float vel);
/**
* Gets the max velocity of a player.
* Sets the max velocity a player has reached in a run. (timer_snapshot_t.fMaxVelocity)
*
* @param client Client index
* @param vel Max velocity

View File

@ -3549,7 +3549,10 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
return;
}
if (GetStyleSettingBool(gA_Timers[client].bsStyle, "strafe_count_w")
int iGroundEntity = GetEntPropEnt(client, Prop_Send, "m_hGroundEntity");
if (iGroundEntity == -1
&& GetStyleSettingBool(gA_Timers[client].bsStyle, "strafe_count_w")
&& !GetStyleSettingBool(gA_Timers[client].bsStyle, "block_w")
&& (gA_Timers[client].fLastInputVel[0] <= 0.0) && (vel[0] > 0.0)
&& GetStyleSettingInt(gA_Timers[client].bsStyle, "force_hsw") != 1
@ -3558,7 +3561,8 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
gA_Timers[client].iStrafes++;
}
if (GetStyleSettingBool(gA_Timers[client].bsStyle, "strafe_count_s")
if (iGroundEntity == -1
&& GetStyleSettingBool(gA_Timers[client].bsStyle, "strafe_count_s")
&& !GetStyleSettingBool(gA_Timers[client].bsStyle, "block_s")
&& (gA_Timers[client].fLastInputVel[0] >= 0.0) && (vel[0] < 0.0)
)
@ -3566,7 +3570,8 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
gA_Timers[client].iStrafes++;
}
if (GetStyleSettingBool(gA_Timers[client].bsStyle, "strafe_count_a")
if (iGroundEntity == -1
&& GetStyleSettingBool(gA_Timers[client].bsStyle, "strafe_count_a")
&& !GetStyleSettingBool(gA_Timers[client].bsStyle, "block_a")
&& (gA_Timers[client].fLastInputVel[1] >= 0.0) && (vel[1] < 0.0)
&& (GetStyleSettingInt(gA_Timers[client].bsStyle, "force_hsw") > 0 || vel[0] == 0.0)
@ -3575,7 +3580,8 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
gA_Timers[client].iStrafes++;
}
if (GetStyleSettingBool(gA_Timers[client].bsStyle, "strafe_count_d")
if (iGroundEntity == -1
&& GetStyleSettingBool(gA_Timers[client].bsStyle, "strafe_count_d")
&& !GetStyleSettingBool(gA_Timers[client].bsStyle, "block_d")
&& (gA_Timers[client].fLastInputVel[1] <= 0.0) && (vel[1] > 0.0)
&& (GetStyleSettingInt(gA_Timers[client].bsStyle, "force_hsw") > 0 || vel[0] == 0.0)
@ -3584,8 +3590,6 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
gA_Timers[client].iStrafes++;
}
int iGroundEntity = GetEntPropEnt(client, Prop_Send, "m_hGroundEntity");
float fAngle = GetAngleDiff(angles[1], gA_Timers[client].fLastAngle);
float fAbsVelocity[3];

View File

@ -197,15 +197,13 @@ public void Shavit_OnFinish(int client, int style, float time, int jumps, int st
}
}
public void Shavit_OnFinish_Post(int client, int style, float time, int jumps, int strafes, float sync, int rank, int overwrite, int track)
public void Shavit_OnFinish_Post(int client, int style, float time, int jumps, int strafes, float sync, int rank, int overwrite, int track, float fOldTime)
{
if(!gCV_Enabled.BoolValue)
{
return;
}
float fOldTime = Shavit_GetClientPB(client, style, track);
char sSound[PLATFORM_MAX_PATH];
bool bEveryone = false;