- Added some camera anchors for Round 2.

- Modem is once again functional.
- Round 1 entrance door is now about as thin as a standard door should be.
This commit is contained in:
2025-09-21 19:41:48 -04:00
parent f88c5598ee
commit 1866a92c8a
9 changed files with 6816 additions and 82 deletions
+15 -21
View File
@@ -3,7 +3,6 @@ using UdonSharp;
using UnityEngine;
using VRC.SDK3.UdonNetworkCalling;
using VRC.SDKBase;
using VRC.Udon;
using VRC.Udon.Common.Interfaces;
@@ -30,39 +29,33 @@ public class Modem : UdonSharpBehaviour
public override void OnPlayerTriggerEnter(VRCPlayerApi Player)
{
if (Player.IsOwner(gameObject))
for (int i = 0; i < MAX_PLAYERS_IN_MODEM; i++)
{
for (int i = 0; i < MAX_PLAYERS_IN_MODEM; i++)
if (_EnteredPlayers[i] == null)
{
if (_EnteredPlayers[i] == null)
{
_EnteredPlayers[i] = Player.displayName;
break;
}
_EnteredPlayers[i] = Player.displayName;
break;
}
RequestSerialization();
}
RequestSerialization();
base.OnPlayerTriggerEnter(Player);
}
public override void OnPlayerTriggerExit(VRCPlayerApi Player)
{
if (Player.IsOwner(gameObject))
for (int i = 0; i < MAX_PLAYERS_IN_MODEM; i++)
{
for (int i = 0; i < MAX_PLAYERS_IN_MODEM; i++)
if (_EnteredPlayers[i] == Player.displayName)
{
if (_EnteredPlayers[i] == Player.displayName)
{
_EnteredPlayers[i] = null;
break;
}
_EnteredPlayers[i] = null;
break;
}
RequestSerialization();
}
RequestSerialization();
base.OnPlayerTriggerExit(Player);
}
@@ -75,6 +68,7 @@ public class Modem : UdonSharpBehaviour
public void Teleport()
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
BeginTeleport = true;
RequestSerialization();
}
@@ -87,14 +81,14 @@ public class Modem : UdonSharpBehaviour
_ModemAnimator.SetBool("Teleport", true);
_ModemDestinationAnimator.SetBool("Teleport", true);
SendCustomEventDelayedSeconds(nameof(TeleportAllPlayers), 4.0f);
SendCustomEventDelayedSeconds(nameof(TeleportAllPlayers), 2.5f);
SendCustomEventDelayedSeconds(nameof(EndTeleport), 6.0f);
}
public void TeleportAllPlayers()
{
// Only the Modem owner should execute teleportations.
if (Networking.GetOwner(gameObject) == Networking.LocalPlayer)
if (Networking.LocalPlayer.IsOwner(gameObject))
{
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(TeleportLocalPlayerIfInModem));
}