prevent emitters being turned on or off when unanchored (#17303)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -317,6 +317,10 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
|
||||
private void OnSignalReceived(EntityUid uid, EmitterComponent component, ref SignalReceivedEvent args)
|
||||
{
|
||||
// must anchor the emitter for signals to work
|
||||
if (TryComp<PhysicsComponent>(uid, out var phys) && phys.BodyType != BodyType.Static)
|
||||
return;
|
||||
|
||||
if (args.Port == component.OffPort)
|
||||
{
|
||||
SwitchOff(uid, component);
|
||||
|
||||
Reference in New Issue
Block a user