Gun sound fixes (#8592)
This commit is contained in:
@@ -143,7 +143,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
{
|
||||
SetCartridgeSpent(cartridge, true);
|
||||
MuzzleFlash(gun.Owner, cartridge, user);
|
||||
|
||||
PlaySound(gun.Owner, gun.SoundGunshot?.GetSound(Random, ProtoManager), user);
|
||||
// TODO: Can't predict entity deletions.
|
||||
//if (cartridge.DeleteOnSpawn)
|
||||
// Del(cartridge.Owner);
|
||||
@@ -159,11 +159,15 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
break;
|
||||
case AmmoComponent newAmmo:
|
||||
MuzzleFlash(gun.Owner, newAmmo, user);
|
||||
PlaySound(gun.Owner, gun.SoundGunshot?.GetSound(Random, ProtoManager), user);
|
||||
if (newAmmo.Owner.IsClientSide())
|
||||
Del(newAmmo.Owner);
|
||||
else
|
||||
RemComp<AmmoComponent>(newAmmo.Owner);
|
||||
break;
|
||||
case HitscanPrototype:
|
||||
PlaySound(gun.Owner, gun.SoundGunshot?.GetSound(Random, ProtoManager), user);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user