diff --git a/dlls/gearbox/fgrunt.cpp b/dlls/gearbox/fgrunt.cpp index 4582f67b..c7aa5a3c 100644 --- a/dlls/gearbox/fgrunt.cpp +++ b/dlls/gearbox/fgrunt.cpp @@ -1846,7 +1846,8 @@ void CHFGrunt :: HandleAnimEvent( MonsterEvent_t *pEvent ) { case HGRUNT_ALLY_AE_DROP_GUN: { - DropMyItems(FALSE); + if (GetBodygroup(FG_GUN_GROUP) != FG_GUN_NONE) + DropMyItems(FALSE); SetUse( NULL ); } break; @@ -3240,7 +3241,7 @@ void CTorch::HandleAnimEvent(MonsterEvent_t *pEvent) KillGas (); break; case HGRUNT_ALLY_AE_DROP_GUN: - if ( FBitSet( pev->weapons, TORCH_EAGLE ) ) + if ( FBitSet( pev->weapons, TORCH_EAGLE ) && pev->body != TORCH_GUN_NONE ) { DropMyItems(FALSE); } @@ -3771,7 +3772,7 @@ void CMedic::HandleAnimEvent(MonsterEvent_t *pEvent) break; case HGRUNT_ALLY_AE_DROP_GUN: - if ( FBitSet( pev->weapons, MEDIC_EAGLE | MEDIC_HANDGUN ) ) + if ( FBitSet( pev->weapons, MEDIC_EAGLE | MEDIC_HANDGUN ) && GetBodygroup(MEDIC_GUN_GROUP) != MEDIC_GUN_NONE ) { DropMyItems(FALSE); } diff --git a/dlls/gearbox/massn.cpp b/dlls/gearbox/massn.cpp index 4e9d0631..0ca4124e 100644 --- a/dlls/gearbox/massn.cpp +++ b/dlls/gearbox/massn.cpp @@ -155,26 +155,28 @@ void CMassn::HandleAnimEvent(MonsterEvent_t *pEvent) Vector vecGunPos; Vector vecGunAngles; - GetAttachment(0, vecGunPos, vecGunAngles); + if(GetBodygroup(GUN_GROUP) != GUN_NONE) + { + GetAttachment(0, vecGunPos, vecGunAngles); - // switch to body group with no gun. - SetBodygroup(GUN_GROUP, GUN_NONE); + // switch to body group with no gun. + SetBodygroup(GUN_GROUP, GUN_NONE); - // now spawn a gun. - if (FBitSet(pev->weapons, MASSN_SNIPERRIFLE)) - { - DropItem("weapon_sniperrifle", vecGunPos, vecGunAngles); - } - else - { - DropItem("weapon_9mmAR", vecGunPos, vecGunAngles); - } + // now spawn a gun. + if (FBitSet(pev->weapons, MASSN_SNIPERRIFLE)) + { + DropItem("weapon_sniperrifle", vecGunPos, vecGunAngles); + } + else + { + DropItem("weapon_9mmAR", vecGunPos, vecGunAngles); + } - if (FBitSet(pev->weapons, MASSN_GRENADELAUNCHER)) - { - DropItem("ammo_ARgrenades", BodyTarget(pev->origin), vecGunAngles); + if (FBitSet(pev->weapons, MASSN_GRENADELAUNCHER)) + { + DropItem("ammo_ARgrenades", BodyTarget(pev->origin), vecGunAngles); + } } - } break;