From a14bca1059fa47770eeacb5bd66b276ef6b1626b Mon Sep 17 00:00:00 2001 From: Justin Lovell Date: Sat, 3 Jul 2021 23:30:45 +1000 Subject: [PATCH] Synchronize Text with Wrapper State Bug - text is not synchronized with the wrapper state, hence the `GetText()` will be incorrect. Method `TextChanged` does not exist, resulting `nil` reference errors when the players update markers. Current implementation of `MARKER:OnEventMarkChange(EventData)` is not implemented the same as its siblings of `OnEventMarkRemoved` and `OnEventMarkAdded`. The siblings would move the FSM accordingly -- aligned implementation --- Moose Development/Moose/Wrapper/Marker.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Marker.lua b/Moose Development/Moose/Wrapper/Marker.lua index 88a868501..1027e030a 100644 --- a/Moose Development/Moose/Wrapper/Marker.lua +++ b/Moose Development/Moose/Wrapper/Marker.lua @@ -673,9 +673,9 @@ function MARKER:OnEventMarkChange(EventData) if MarkID==self.mid then - self:Changed(EventData) + self.text=tostring(EventData.MarkText) - self:TextChanged(tostring(EventData.MarkText)) + self:Changed(EventData) end