mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
fix typos for avg/max velocity
This commit is contained in:
parent
d4893ec713
commit
07e07fd7c8
@ -1842,7 +1842,7 @@ native void Shavit_LogMessage(const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Gets the average and max velocity of a player's jumps.
|
||||
* Velocity is calculated as a 2d vector (GetVectorLength(fSpeed)).
|
||||
* Velocity is calculated as a 2d vector.
|
||||
* Average calculation: avg += (vel - avg) / jumps
|
||||
*
|
||||
* @param client Client index
|
||||
|
||||
@ -1440,9 +1440,9 @@ void VelocityChanges(int data)
|
||||
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, fAbsVelocity);
|
||||
}
|
||||
|
||||
if (GetTimerStatus(client) == Timer_Running)
|
||||
if (GetTimerStatus(client) == view_as<int>(Timer_Running))
|
||||
{
|
||||
float curVel = GetVectorLength(fAbsVelocity);
|
||||
float curVel = SquareRoot(Pow(fAbsVelocity[0], 2.0) + Pow(fAbsVelocity[1], 2.0));
|
||||
float maxVel = gA_Timers[client].fMaxVelocity;
|
||||
gA_Timers[client].fMaxVelocity = (curVel > maxVel) ? curVel : maxVel;
|
||||
// STOLEN from Epic/Disrevoid. Thx :)
|
||||
@ -2179,8 +2179,8 @@ public any Native_HasStyleSetting(Handle handler, int numParams)
|
||||
public any Native_GetAvgMaxVelocity(Handle plugin, int numParams)
|
||||
{
|
||||
int client = GetNativeCell(1);
|
||||
SetNativeCellRef(2, gF_AvgVelocity[client]);
|
||||
SetNativeCellRef(3, gF_MaxVelocity[client]);
|
||||
SetNativeCellRef(2, gA_Timers[client].fAvgVelocity);
|
||||
SetNativeCellRef(3, gA_Timers[client].fMaxVelocity);
|
||||
}
|
||||
|
||||
bool HasStyleSetting(int style, char[] key)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user