From f353fd8e8f7a9b9f2786bbde3a0dacf32c701b57 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 14 Mar 2022 04:52:39 -0700 Subject: [PATCH] eclipseCodeController initial state message - dont use WorldObject in ctor --- .../EclipseCodeControllers/Messages/InitialStateMessage.cs | 6 +++--- .../WorldObjects/QSBEclipseCodeController.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/QSB/EchoesOfTheEye/EclipseCodeControllers/Messages/InitialStateMessage.cs b/QSB/EchoesOfTheEye/EclipseCodeControllers/Messages/InitialStateMessage.cs index 8fe633d3..f492a7fb 100644 --- a/QSB/EchoesOfTheEye/EclipseCodeControllers/Messages/InitialStateMessage.cs +++ b/QSB/EchoesOfTheEye/EclipseCodeControllers/Messages/InitialStateMessage.cs @@ -10,10 +10,10 @@ internal class InitialStateMessage : QSBWorldObjectMessage x.GetSymbolSelected()).ToArray(); + _selectedDial = eclipseCodeController._selectedDial; + _dialSelectedSymbols = eclipseCodeController._dials.Select(x => x.GetSymbolSelected()).ToArray(); } public override void Serialize(NetworkWriter writer) diff --git a/QSB/EchoesOfTheEye/EclipseCodeControllers/WorldObjects/QSBEclipseCodeController.cs b/QSB/EchoesOfTheEye/EclipseCodeControllers/WorldObjects/QSBEclipseCodeController.cs index 0bfa41e3..012b78ac 100644 --- a/QSB/EchoesOfTheEye/EclipseCodeControllers/WorldObjects/QSBEclipseCodeController.cs +++ b/QSB/EchoesOfTheEye/EclipseCodeControllers/WorldObjects/QSBEclipseCodeController.cs @@ -12,7 +12,7 @@ public class QSBEclipseCodeController : WorldObject public PlayerInfo PlayerInControl; public override void SendInitialState(uint to) - => this.SendMessage(new InitialStateMessage() { To = to }); + => this.SendMessage(new InitialStateMessage(AttachedObject) { To = to }); public override async UniTask Init(CancellationToken ct) {