weapon_slam.cpp: fixed being unable to detonate the satchel when holding a detonator (i.e. having a satchel in the world) and ready tripmine in hands.

This commit is contained in:
Zodomaniac 2022-01-29 23:15:43 +03:00
parent 0d8dceea43
commit 19f3e2ca0f

View File

@ -303,7 +303,7 @@ bool CWeapon_SLAM::AnyUndetonatedCharges(void)
void CWeapon_SLAM::StartSatchelDetonate()
{
if ( GetActivity() != ACT_SLAM_DETONATOR_IDLE && GetActivity() != ACT_SLAM_THROW_IDLE )
if ( GetActivity() != ACT_SLAM_DETONATOR_IDLE && GetActivity() != ACT_SLAM_THROW_IDLE && !m_bDetonatorArmed ) //fix for being unable to detonate when holding a detonator and ready tripmine in hand
return;
// -----------------------------------------
@ -313,7 +313,7 @@ void CWeapon_SLAM::StartSatchelDetonate()
{
SendWeaponAnim(ACT_SLAM_DETONATOR_DETONATE);
}
else if (m_tSlamState == SLAM_SATCHEL_ATTACH)
else if (m_tSlamState == SLAM_SATCHEL_ATTACH || m_tSlamState == SLAM_TRIPMINE_READY) // second part of the aforementioned fix
{
SendWeaponAnim(ACT_SLAM_STICKWALL_DETONATE);
}