Gun sound fixes (#8592)

This commit is contained in:
metalgearsloth
2022-06-02 19:13:13 +10:00
committed by GitHub
parent 5ed2c27658
commit c021cadd46
4 changed files with 12 additions and 6 deletions

View File

@@ -242,11 +242,8 @@ public abstract partial class SharedGunSystem : EntitySystem
return;
}
// Shoot confirmed
// Shoot confirmed - sounds also played here in case it's invalid (e.g. cartridge already spent).
Shoot(gun, ev.Ammo, fromCoordinates, toCoordinates.Value, user);
// Predicted sound moment
PlaySound(gun.Owner, gun.SoundGunshot?.GetSound(Random, ProtoManager), user);
Dirty(gun);
}