Browse Source

Fix male assassins and opfor grunts dropping weapons again (#372)

opfor
Roman Chistokhodov 2 years ago committed by GitHub
parent
commit
341e2767ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dlls/gearbox/fgrunt.cpp
  2. 4
      dlls/gearbox/massn.cpp

5
dlls/gearbox/fgrunt.cpp

@ -1846,6 +1846,7 @@ void CHFGrunt :: HandleAnimEvent( MonsterEvent_t *pEvent )
{ {
case HGRUNT_ALLY_AE_DROP_GUN: case HGRUNT_ALLY_AE_DROP_GUN:
{ {
if (GetBodygroup(FG_GUN_GROUP) != FG_GUN_NONE)
DropMyItems(FALSE); DropMyItems(FALSE);
SetUse( NULL ); SetUse( NULL );
} }
@ -3240,7 +3241,7 @@ void CTorch::HandleAnimEvent(MonsterEvent_t *pEvent)
KillGas (); KillGas ();
break; break;
case HGRUNT_ALLY_AE_DROP_GUN: 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); DropMyItems(FALSE);
} }
@ -3771,7 +3772,7 @@ void CMedic::HandleAnimEvent(MonsterEvent_t *pEvent)
break; break;
case HGRUNT_ALLY_AE_DROP_GUN: 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); DropMyItems(FALSE);
} }

4
dlls/gearbox/massn.cpp

@ -155,6 +155,8 @@ void CMassn::HandleAnimEvent(MonsterEvent_t *pEvent)
Vector vecGunPos; Vector vecGunPos;
Vector vecGunAngles; Vector vecGunAngles;
if(GetBodygroup(GUN_GROUP) != GUN_NONE)
{
GetAttachment(0, vecGunPos, vecGunAngles); GetAttachment(0, vecGunPos, vecGunAngles);
// switch to body group with no gun. // switch to body group with no gun.
@ -174,7 +176,7 @@ void CMassn::HandleAnimEvent(MonsterEvent_t *pEvent)
{ {
DropItem("ammo_ARgrenades", BodyTarget(pev->origin), vecGunAngles); DropItem("ammo_ARgrenades", BodyTarget(pev->origin), vecGunAngles);
} }
}
} }
break; break;

Loading…
Cancel
Save