mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 21:24:27 +00:00
Fix male assassins and opfor grunts dropping weapons again (#372)
This commit is contained in:
parent
fd613ebed7
commit
341e2767ad
@ -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);
|
||||
}
|
||||
|
@ -155,26 +155,28 @@ void CMassn::HandleAnimEvent(MonsterEvent_t *pEvent)
|
||||
Vector vecGunPos;
|
||||
Vector vecGunAngles;
|
||||
|
||||
GetAttachment(0, vecGunPos, vecGunAngles);
|
||||
|
||||
// switch to body group with no gun.
|
||||
SetBodygroup(GUN_GROUP, GUN_NONE);
|
||||
|
||||
// now spawn a gun.
|
||||
if (FBitSet(pev->weapons, MASSN_SNIPERRIFLE))
|
||||
if(GetBodygroup(GUN_GROUP) != GUN_NONE)
|
||||
{
|
||||
DropItem("weapon_sniperrifle", vecGunPos, vecGunAngles);
|
||||
}
|
||||
else
|
||||
{
|
||||
DropItem("weapon_9mmAR", vecGunPos, vecGunAngles);
|
||||
}
|
||||
GetAttachment(0, vecGunPos, vecGunAngles);
|
||||
|
||||
if (FBitSet(pev->weapons, MASSN_GRENADELAUNCHER))
|
||||
{
|
||||
DropItem("ammo_ARgrenades", BodyTarget(pev->origin), vecGunAngles);
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
|
||||
if (FBitSet(pev->weapons, MASSN_GRENADELAUNCHER))
|
||||
{
|
||||
DropItem("ammo_ARgrenades", BodyTarget(pev->origin), vecGunAngles);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user