mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
Fix the on-ground 0.5s start-timer check from 89e97dfd3d
This commit is contained in:
parent
309cdf3acf
commit
00feb624c2
@ -2569,10 +2569,15 @@ bool CanStartTimer(int client, int track, bool skipGroundCheck)
|
||||
|
||||
if (skipGroundTimer) return true;
|
||||
|
||||
int halfSecOfTicks = RoundFloat(0.5 / GetTickInterval());
|
||||
int onGroundTicks = gI_LastTickcount[client] - gI_FirstTouchedGround[client];
|
||||
if (gI_FirstTouchedGround[client] > 0)
|
||||
{
|
||||
int halfSecOfTicks = RoundFloat(0.5 / GetTickInterval());
|
||||
int onGroundTicks = gI_LastTickcount[client] - gI_FirstTouchedGround[client];
|
||||
|
||||
return onGroundTicks >= halfSecOfTicks;
|
||||
return onGroundTicks >= halfSecOfTicks;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void StartTimer(int client, int track, bool skipGroundCheck)
|
||||
@ -3672,6 +3677,11 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
}
|
||||
}
|
||||
|
||||
if (!bOnGround)
|
||||
{
|
||||
gI_FirstTouchedGround[client] = 0;
|
||||
}
|
||||
|
||||
// This can be bypassed by spamming +duck on CSS which causes `iGroundEntity` to be `-1` here...
|
||||
// (e.g. an autobhop + velocity_limit style...)
|
||||
// m_hGroundEntity changes from 0 -> -1 same tick which causes problems and I'm not sure what the best way / place to handle that is...
|
||||
|
||||
Loading…
Reference in New Issue
Block a user