Fix the "weapon sounds stuck playing after death/drop" problem at the core UTWeapon class.
This commit is contained in:
parent
9e537f6159
commit
4bbc308eaf
4 changed files with 10 additions and 9 deletions
|
|
@ -219,7 +219,8 @@ Class UTChainsaw : UTWeapon
|
|||
override void DetachFromOwner()
|
||||
{
|
||||
if ( Owner ) Owner.A_StopSound(CHAN_6);
|
||||
A_PlaySound("chainsaw/lower",CHAN_6);
|
||||
if ( !Ammo1 || (Ammo1.Amount > 0) )
|
||||
A_PlaySound("chainsaw/lower",CHAN_6);
|
||||
Super.DetachFromOwner();
|
||||
}
|
||||
action void A_Vibrate( bool bAlt = false )
|
||||
|
|
|
|||
|
|
@ -199,11 +199,6 @@ Class ImpactHammer : UTWeapon
|
|||
s.scale *= 0.4;
|
||||
}
|
||||
}
|
||||
override void DetachFromOwner()
|
||||
{
|
||||
if ( Owner ) Owner.A_StopSound(CHAN_WEAPON);
|
||||
Super.DetachFromOwner();
|
||||
}
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
|
|||
|
|
@ -673,12 +673,10 @@ Class PulseGun : UTWeapon
|
|||
{
|
||||
Super.OwnerDied();
|
||||
if ( beam ) beam.Destroy();
|
||||
Owner.A_StopSound(CHAN_WEAPON);
|
||||
}
|
||||
override void DetachFromOwner()
|
||||
{
|
||||
if ( beam ) beam.Destroy();
|
||||
Owner.A_StopSound(CHAN_WEAPON);
|
||||
Super.DetachFromOwner();
|
||||
}
|
||||
override void OnDestroy()
|
||||
|
|
|
|||
|
|
@ -1336,10 +1336,17 @@ Class UTWeapon : Weapon
|
|||
if ( amp ) amp.FireEffect();
|
||||
}
|
||||
|
||||
override void DetachFromOwner()
|
||||
{
|
||||
Owner.A_StopSound(CHAN_WEAPON);
|
||||
Super.DetachFromOwner();
|
||||
}
|
||||
override void OwnerDied()
|
||||
{
|
||||
Super.OwnerDied();
|
||||
if ( Owner.player && (Owner.player.ReadyWeapon == self) )
|
||||
Owner.A_StopSound(CHAN_WEAPON);
|
||||
A_ClearRefire();
|
||||
Super.OwnerDied();
|
||||
}
|
||||
|
||||
override bool HandlePickup( Inventory item )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue