You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This value is tied to the data used to run the prediction code for this frame. When re-running an older frame this value will be earlier in time than the actual time the engine is on at that point.
This causes problems with weapon prediction. Any time values that still use absolute time values will interact poorly with this, for example the Opposing Force M249 and Sniper Rifle will restart the second part of their full reload animation when used with this code.
Strictly speaking the time values should use relative values but this isn't always feasible to implement.
Opposing Force changes the time value used to always use the value returned by gEngfuncs.GetClientTime(). This fixes the animation issues caused by older time values.
if ((m_fInReload) && (m_pPlayer->m_flNextAttack <= 0.0))
But setting the value at the start of HUD_WeaponsPostThink will work fine as well.
This change doesn't break existing weapons code in Half-Life and Blue Shift since all of the original weapons are running with this value in Opposing Force.
I wouldn't recommend using this in other games since it hasn't been tested there.
The text was updated successfully, but these errors were encountered:
Opposing Force changes which time value the weapon prediction code uses.
The original code use the time value provided by the engine, which is set here:
halflife/cl_dll/hl/hl_weapons.cpp
Line 681 in c7240b9
This value is tied to the data used to run the prediction code for this frame. When re-running an older frame this value will be earlier in time than the actual time the engine is on at that point.
This causes problems with weapon prediction. Any time values that still use absolute time values will interact poorly with this, for example the Opposing Force M249 and Sniper Rifle will restart the second part of their full reload animation when used with this code.
Strictly speaking the time values should use relative values but this isn't always feasible to implement.
Opposing Force changes the time value used to always use the value returned by
gEngfuncs.GetClientTime()
. This fixes the animation issues caused by older time values.This value is overridden here in Opposing Force:
halflife/cl_dll/hl/hl_weapons.cpp
Lines 325 to 327 in c7240b9
But setting the value at the start of
HUD_WeaponsPostThink
will work fine as well.This change doesn't break existing weapons code in Half-Life and Blue Shift since all of the original weapons are running with this value in Opposing Force.
I wouldn't recommend using this in other games since it hasn't been tested there.
The text was updated successfully, but these errors were encountered: