From 90d85dcba1e3d4dae9fba609dad8b03035715abd Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Mon, 17 Aug 2020 12:00:31 +0100 Subject: [PATCH] fix --- QSB/TransformSync/PlayerSectorEvent.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/QSB/TransformSync/PlayerSectorEvent.cs b/QSB/TransformSync/PlayerSectorEvent.cs index 2727478c..06516af0 100644 --- a/QSB/TransformSync/PlayerSectorEvent.cs +++ b/QSB/TransformSync/PlayerSectorEvent.cs @@ -11,7 +11,12 @@ namespace QSB.TransformSync public override void SetupListener() { - GlobalMessenger.AddListener(EventNames.QSBSectorChange, Handler); + GlobalMessenger.AddListener(EventNames.QSBSectorChange, Handler); + } + + public override void CloseListener() + { + GlobalMessenger.RemoveListener(EventNames.QSBSectorChange, Handler); } private void Handler(uint netId, QSBSector sector) => SendEvent(CreateMessage(netId, sector));