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
game\shared: Let player shoot on the same tick they canceled their reload
"When a player tries to shoot a weapon with a non-empty clip while reloading in TF2, it cancels the reload on the first tick and only fires the weapon on the tick after. This happens because ItemBusyFrame (idle logic) and ItemPostFrame (shooting logic) are separated with an if/else statement controlled by gpGlobals->curtime < m_flNextAttack. Canceling a reload is effectively done by setting m_flNextAttack = gpGlobals->curtime inside ItemBusyFrame, so ItemPostFrame is skipped over even though m_flNextAttack marks the weapon as ready to shoot."
Changing the if/else to an if/if solves this. I'm pretty sure it shouldn't cause any problems as it only applies when m_flNextAttack is intentionally set to gpGlobals->curtime by weapon logic. However this is mostly a change directed at TF2, so I could specifically target TF2's reload cancel if need be.
See ValveSoftware/source-sdk-2013#935
0 commit comments