EVERYTHING

This commit is contained in:
niko
2026-06-01 17:19:55 +02:00
parent d063b81359
commit b62bac090b
1081 changed files with 1716544 additions and 0 deletions
@@ -0,0 +1,28 @@
using Photon.Pun;
using UnityEngine;
namespace BlockSpace.Worlds
{
[DisallowMultipleComponent]
public sealed class FallResetTeleport : MonoBehaviourPunCallbacks
{
[SerializeField]
private float yKillPlane = -2000f;
[SerializeField]
private Vector3 respawnPosition = new Vector3(0f, 5f, 0f);
private void Update()
{
if (PhotonNetwork.InRoom && PhotonNetwork.LocalPlayer != null)
{
Transform localVrTeleportRoot = PlayerTeleportUtil.GetLocalVrTeleportRoot();
Vector3 obj = ((localVrTeleportRoot != null) ? localVrTeleportRoot.position : base.transform.position);
if (!(obj.y >= yKillPlane))
{
PlayerTeleportUtil.TryTeleportLocalPlayer(respawnPosition);
}
}
}
}
}