mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
fix key debug assert on round restart (#16296)
This commit is contained in:
parent
20748cc542
commit
7955183b31
1 changed files with 3 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ public sealed class HeadsetSystem : SharedHeadsetSystem
|
|||
SubscribeLocalEvent<HeadsetComponent, EncryptionChannelsChangedEvent>(OnKeysChanged);
|
||||
|
||||
SubscribeLocalEvent<WearingHeadsetComponent, EntitySpokeEvent>(OnSpeak);
|
||||
|
||||
|
||||
SubscribeLocalEvent<HeadsetComponent, EmpPulseEvent>(OnEmpPulse);
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +33,8 @@ public sealed class HeadsetSystem : SharedHeadsetSystem
|
|||
|
||||
private void UpdateRadioChannels(EntityUid uid, HeadsetComponent headset, EncryptionKeyHolderComponent? keyHolder = null)
|
||||
{
|
||||
if (!headset.Enabled)
|
||||
// make sure to not add ActiveRadioComponent when headset is being deleted
|
||||
if (!headset.Enabled || MetaData(uid).EntityLifeStage >= EntityLifeStage.Terminating)
|
||||
return;
|
||||
|
||||
if (!Resolve(uid, ref keyHolder))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue