Fixed an issue where floor markers stop working if a non-owner touches them.

This commit is contained in:
2025-07-16 02:03:22 -04:00
parent 2f6a6a37d0
commit 3f858ed7d2
10 changed files with 51 additions and 35 deletions
@@ -125,7 +125,10 @@ public class GameManagerRound3 : GameManagerBase
public void BeginRound()
{
GetCurrentMarker().Activated(true);
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)GetCurrentMarker(),
NetworkEventTarget.Owner,
"Activated", true);
UpdateInterface();
@@ -163,7 +166,10 @@ public class GameManagerRound3 : GameManagerBase
{
PlayCorrectSound();
GetCurrentMarker().Activated(false);
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)GetCurrentMarker(),
NetworkEventTarget.Owner,
"Activated", false);
_FailureCounter = 0;
_SuccessCounter++;
@@ -186,7 +192,10 @@ public class GameManagerRound3 : GameManagerBase
if (_FailureCounter >= MAX_FAILURE_COUNT)
{
_FailureCounter = 0;
GetCurrentMarker().Activated(false);
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)GetCurrentMarker(),
NetworkEventTarget.Owner,
"Activated", false);
SetUpNextCountry();
}
@@ -225,7 +234,10 @@ public class GameManagerRound3 : GameManagerBase
nameof(GameHasBeenLost), true);
return;
}
GetCurrentMarker().Activated(true);
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)GetCurrentMarker(),
NetworkEventTarget.Owner,
"Activated", true);
UpdateInterface();
}
@@ -272,7 +284,10 @@ public class GameManagerRound3 : GameManagerBase
{
for (int i = 0; i < _Markers.Length; i++)
{
_Markers[i].Activated(false);
NetworkCalling.SendCustomNetworkEvent(
(IUdonEventReceiver)_Markers[i],
NetworkEventTarget.Owner,
"Activated", false);
}
GameStatusUpdate(RanOutOfMarkers ? GameStatus.RanOutOfMarkers : GameStatus.RanOutOfTime);