Fix magazine sprites after Auto Eject (#28859)
Co-authored-by: geraeumig <alfenos@proton.me>
This commit is contained in:
@@ -146,13 +146,14 @@ public abstract partial class SharedGunSystem
|
||||
private void FinaliseMagazineTakeAmmo(EntityUid uid, MagazineAmmoProviderComponent component, int count, int capacity, EntityUid? user, AppearanceComponent? appearance)
|
||||
{
|
||||
// If no ammo then check for autoeject
|
||||
if (component.AutoEject && count == 0)
|
||||
var ejectMag = component.AutoEject && count == 0;
|
||||
if (ejectMag)
|
||||
{
|
||||
EjectMagazine(uid, component);
|
||||
Audio.PlayPredicted(component.SoundAutoEject, uid, user);
|
||||
}
|
||||
|
||||
UpdateMagazineAppearance(uid, appearance, true, count, capacity);
|
||||
UpdateMagazineAppearance(uid, appearance, !ejectMag, count, capacity);
|
||||
}
|
||||
|
||||
private void UpdateMagazineAppearance(EntityUid uid, MagazineAmmoProviderComponent component, EntityUid magEnt)
|
||||
|
||||
Reference in New Issue
Block a user