Fix firelock prediction issues with periodic pulses of closing lights (#28227)
* Fix firelock prediction issues with periodic pulses of closing lights For some reason this function was setting a time for the next state which was triggering the door system to try to close the firelock. This does not happen serverside because the function only fires from an event called clientside apparently. It appears to be an attempt to stop firelocks from closing instantly that did not function properly, and I cannot discern any other purpose. As such I have removed it. * Remove redundant serverside check This became redundant with commit 439a87f2
This commit is contained in:
@@ -18,8 +18,6 @@ public abstract class SharedFirelockSystem : EntitySystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<FirelockComponent, DoorStateChangedEvent>(OnUpdateState);
|
||||
|
||||
// Access/Prying
|
||||
SubscribeLocalEvent<FirelockComponent, BeforeDoorOpenedEvent>(OnBeforeDoorOpened);
|
||||
SubscribeLocalEvent<FirelockComponent, GetPryTimeModifierEvent>(OnDoorGetPryTimeModifier);
|
||||
@@ -46,19 +44,6 @@ public abstract class SharedFirelockSystem : EntitySystem
|
||||
return _doorSystem.OnPartialClose(uid, door);
|
||||
}
|
||||
|
||||
private void OnUpdateState(EntityUid uid, FirelockComponent component, DoorStateChangedEvent args)
|
||||
{
|
||||
var ev = new BeforeDoorAutoCloseEvent();
|
||||
RaiseLocalEvent(uid, ev);
|
||||
UpdateVisuals(uid, component, args);
|
||||
if (ev.Cancelled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_doorSystem.SetNextStateChange(uid, component.AutocloseDelay);
|
||||
}
|
||||
|
||||
#region Access/Prying
|
||||
|
||||
private void OnBeforeDoorOpened(EntityUid uid, FirelockComponent component, BeforeDoorOpenedEvent args)
|
||||
|
||||
Reference in New Issue
Block a user