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)
|
if (!Timing.IsFirstTimePredicted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Audio.PlayPvs(component.SupercriticalSound, Transform(uid).Coordinates);
|
|
||||||
|
|
||||||
if (_net.IsServer)
|
if (_net.IsServer)
|
||||||
|
{
|
||||||
|
Audio.PlayPvs(component.SupercriticalSound, Transform(uid).Coordinates);
|
||||||
Log.Info($"Raising supercritical event. Entity: {ToPrettyString(uid)}");
|
Log.Info($"Raising supercritical event. Entity: {ToPrettyString(uid)}");
|
||||||
|
}
|
||||||
|
|
||||||
var powerMod = 1f;
|
var powerMod = 1f;
|
||||||
if (component.CurrentBehavior != null)
|
if (component.CurrentBehavior != null)
|
||||||
@@ -355,7 +356,7 @@ public abstract class SharedAnomalySystem : EntitySystem
|
|||||||
if (Timing.CurTime <= super.EndTime)
|
if (Timing.CurTime <= super.EndTime)
|
||||||
continue;
|
continue;
|
||||||
DoAnomalySupercriticalEvent(ent, anom);
|
DoAnomalySupercriticalEvent(ent, anom);
|
||||||
RemComp(ent, super);
|
// Removal of the supercritical component is handled by DoAnomalySupercriticalEvent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user