diff --git a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
index d3eae3c1b..b023aa312 100644
--- a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
+++ b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
@@ -252,7 +252,7 @@ private void OnCharacterAppearanceChanged(int oldValue, int newValue)
SetAppearanceSwap();
}
- private void OnStealthyChanged(byte oldValue, byte newValue)
+ private void OnStealthyChanged(bool oldValue, bool newValue)
{
SetAppearanceSwap();
}
@@ -261,7 +261,7 @@ private void SetAppearanceSwap()
{
if (m_CharacterSwapper)
{
- if (m_NetState.IsStealthy.Value != 0 && !m_NetState.IsOwner)
+ if (m_NetState.IsStealthy.Value && !m_NetState.IsOwner)
{
// this character is in "stealth mode", so other players can't see them!
m_CharacterSwapper.SwapAllOff();
diff --git a/Assets/BossRoom/Scripts/Server/Game/Action/StealthModeAction.cs b/Assets/BossRoom/Scripts/Server/Game/Action/StealthModeAction.cs
index 6cead3f08..ef4aef9d7 100644
--- a/Assets/BossRoom/Scripts/Server/Game/Action/StealthModeAction.cs
+++ b/Assets/BossRoom/Scripts/Server/Game/Action/StealthModeAction.cs
@@ -25,7 +25,7 @@ public override bool Start()
if (!movement.IsPerformingForcedMovement())
{
movement.CancelMove();
- }
+ }
return true;
}
@@ -40,7 +40,7 @@ public override bool Update()
{
// start actual stealth-mode... NOW!
m_IsStealthStarted = true;
- m_Parent.NetState.IsStealthy.Value = 1;
+ m_Parent.NetState.IsStealthy.Value = true;
}
return !m_IsStealthEnded;
}
@@ -66,7 +66,7 @@ private void EndStealth()
m_IsStealthEnded = true;
if (m_IsStealthStarted)
{
- m_Parent.NetState.IsStealthy.Value = 0;
+ m_Parent.NetState.IsStealthy.Value = false;
}
// note that we cancel the ActionFX here, and NOT in Cancel(). That's to handle the case where someone
diff --git a/Assets/BossRoom/Scripts/Server/Game/Character/AIBrain.cs b/Assets/BossRoom/Scripts/Server/Game/Character/AIBrain.cs
index c8b51220b..67b85da54 100644
--- a/Assets/BossRoom/Scripts/Server/Game/Character/AIBrain.cs
+++ b/Assets/BossRoom/Scripts/Server/Game/Character/AIBrain.cs
@@ -91,7 +91,7 @@ public bool IsAppropriateFoe(ServerCharacter potentialFoe)
if (potentialFoe == null ||
potentialFoe.IsNpc ||
potentialFoe.NetState.NetworkLifeState.Value != LifeState.Alive ||
- potentialFoe.NetState.IsStealthy.Value != 0)
+ potentialFoe.NetState.IsStealthy.Value)
{
return false;
}
diff --git a/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs b/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs
index e63394a58..9cdaadffd 100644
--- a/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs
+++ b/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs
@@ -51,11 +51,7 @@ public void InitNetworkPositionAndRotationY(Vector3 initPosition, float initRota
///
/// Indicates whether this character is in "stealth mode" (invisible to monsters and other players).
///
- ///
- /// FIXME: this should be a bool, but NetworkedVarBool doesn't work at the moment! It's serialized
- /// as a bit, but deserialized as a byte, which corrupts the whole network-var stream.
- ///
- public NetworkVariableByte IsStealthy { get; } = new NetworkVariableByte(0);
+ public NetworkVariableBool IsStealthy { get; } = new NetworkVariableBool();
[SerializeField]
NetworkHealthState m_NetworkHealthState;