From d75946de65295dd6f1f02b32818d8ca54076b0da Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 10 Nov 2025 16:32:23 -0500 Subject: [PATCH] fix: changes to FSM state string to better account for local players --- Assets/Scripts/Units/Unit.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Units/Unit.cs b/Assets/Scripts/Units/Unit.cs index 471cf72..c035afb 100644 --- a/Assets/Scripts/Units/Unit.cs +++ b/Assets/Scripts/Units/Unit.cs @@ -102,13 +102,18 @@ namespace Reset.Units{ private void DrawStateGizmo(){ // Get state from FSM - if (UnitIsLocal()) { + + string stateString = ""; + if (UnitIsNetworked() && UnitIsLocal()) { graphStateAsString.Value = FSM.currentRootStateName; + stateString = graphStateAsString.Value.ToString(); + } else { + stateString = FSM.currentRootStateName; } // Draw state gizmo, regardless of if local or not try { - Draw.ingame.Label2D(transform.position + Vector3.up * 2.7f, graphStateAsString.Value.ToString(), + Draw.ingame.Label2D(transform.position + Vector3.up * 2.7f, stateString, Color.red); } catch (Exception e) { Debug.LogError(e.Message);