Makes a lot of entity systems unsubscribe from events on shutdown.

This commit is contained in:
Vera Aguilera Puerto
2021-04-09 16:08:12 +02:00
parent c28f22ebff
commit 03cd390478
15 changed files with 119 additions and 28 deletions

View File

@@ -51,8 +51,12 @@ namespace Content.Client.GameObjects.EntitySystems
/// <inheritdoc />
public override void Shutdown()
{
CommandBinds.Unregister<ConstructionSystem>();
base.Shutdown();
UnsubscribeLocalEvent<PlayerAttachSysMessage>();
UnsubscribeNetworkEvent<AckStructureConstructionMessage>();
CommandBinds.Unregister<ConstructionSystem>();
}
public event EventHandler<CraftingAvailabilityChangedArgs>? CraftingAvailabilityChanged;