Fix for anomaly double explosion sound and sprite scaling flicker before removal (#36489)
* Fix anomaly supercrit explosion sound playing twice. * Fix so that the supercritical anomaly doesn't scale back to normal visually before removal.
This commit is contained in:
@@ -153,10 +153,11 @@ public abstract class SharedAnomalySystem : EntitySystem
|
||||
if (!Timing.IsFirstTimePredicted)
|
||||
return;
|
||||
|
||||
Audio.PlayPvs(component.SupercriticalSound, Transform(uid).Coordinates);
|
||||
|
||||
if (_net.IsServer)
|
||||
{
|
||||
Audio.PlayPvs(component.SupercriticalSound, Transform(uid).Coordinates);
|
||||
Log.Info($"Raising supercritical event. Entity: {ToPrettyString(uid)}");
|
||||
}
|
||||
|
||||
var powerMod = 1f;
|
||||
if (component.CurrentBehavior != null)
|
||||
@@ -355,7 +356,7 @@ public abstract class SharedAnomalySystem : EntitySystem
|
||||
if (Timing.CurTime <= super.EndTime)
|
||||
continue;
|
||||
DoAnomalySupercriticalEvent(ent, anom);
|
||||
RemComp(ent, super);
|
||||
// Removal of the supercritical component is handled by DoAnomalySupercriticalEvent
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user