source-sdk-2013
source-sdk-2013 copied to clipboard
Fix for being unable to detonate the satchel when holding a detonator (i.e. having a satchel in the world) and ready tripmine in hands.
With this fix the player can detonate the satchel when holding a detonator (i.e. having a satchel in the world) and ready tripmine in hands, unlike in HL2DM https://youtu.be/pvfdsDBldqI
This commit is not quite correct. The addition of !m_bDetonatorArmed subcondition at the start of the function makes the whole condition redundant and always failing since StartSatchelDetonate is only called when m_bDetonatorArmed is true, by default code (see CWeapon_SLAM::SecondaryAttack). This makes being able to detonate satchels anytime (with any undesired animation playing, ie. in the middle of a throw).
Furthermore, the choice of using throw-ready animation for the detonation during tripmine planting ready state isn't natural to me. I prefer using the "unarmed state" detonation animation.
Here is another solution, with the above issue fixed so that detonation is only allowed at "idling" states, including tripmine planting ready state.
@Adrianilloo, thank you, it's a nice surprise to see someone cares. I hope one day I will resume working on Contingency mod (from another account of mine) and will add the fix you suggested.
Here is another solution, with the above issue fixed so that detonation is only allowed at "idling" states, including tripmine planting ready state.
@Adrianilloo Thanks a lot, man! I finally corrected the fix, adapting it to Source SDK 2007 that Contingency runs on. I hope to release a new version soon :)