mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-08 19:08:27 +00:00
speculative fix for timers starting when you're not on the ground
This commit is contained in:
parent
f69d692bd6
commit
3f7d3e3a59
@ -3020,8 +3020,7 @@ public void Shavit_OnRestart(int client, int track)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Just let TouchPost/TouchPost_Trigger handle it so setstarts outside of a start zone don't start.
|
// Just let TouchPost/TouchPost_Trigger handle it so setstarts outside of a start zone don't start.
|
||||||
// TODO: Just remove this Shavit_StartTimer altogether then and let TouchPost/TouchPost_Trigger do it?
|
if (!gB_HasSetStart[client][track] || gB_StartAnglesOnly[client][track])
|
||||||
if (!gB_HasSetStart[client][track])
|
|
||||||
{
|
{
|
||||||
Shavit_StartTimer(client, track);
|
Shavit_StartTimer(client, track);
|
||||||
}
|
}
|
||||||
@ -3326,6 +3325,11 @@ public void TouchPost(int entity, int other)
|
|||||||
{
|
{
|
||||||
case Zone_Start:
|
case Zone_Start:
|
||||||
{
|
{
|
||||||
|
if(GetEntPropEnt(other, Prop_Send, "m_hGroundEntity") == -1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// start timer instantly for main track, but require bonuses to have the current timer stopped
|
// start timer instantly for main track, but require bonuses to have the current timer stopped
|
||||||
// so you don't accidentally step on those while running
|
// so you don't accidentally step on those while running
|
||||||
if(Shavit_GetTimerStatus(other) == Timer_Stopped || Shavit_GetClientTrack(other) != Track_Main)
|
if(Shavit_GetTimerStatus(other) == Timer_Stopped || Shavit_GetClientTrack(other) != Track_Main)
|
||||||
@ -3491,6 +3495,11 @@ public void TouchPost_Trigger(int entity, int other)
|
|||||||
|
|
||||||
if(zone == Zone_Start)
|
if(zone == Zone_Start)
|
||||||
{
|
{
|
||||||
|
if(GetEntPropEnt(other, Prop_Send, "m_hGroundEntity") == -1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(Shavit_GetTimerStatus(other) == Timer_Stopped || Shavit_GetClientTrack(other) != Track_Main)
|
if(Shavit_GetTimerStatus(other) == Timer_Stopped || Shavit_GetClientTrack(other) != Track_Main)
|
||||||
{
|
{
|
||||||
Shavit_StartTimer(other, track);
|
Shavit_StartTimer(other, track);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user