Not harsh world restrictions

This commit is contained in:
SDraw 2023-04-08 23:19:51 +03:00
parent 0e72b04386
commit 0808b5aaaa
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
4 changed files with 27 additions and 14 deletions

View file

@ -6,7 +6,14 @@ namespace ml_prm
static class Utils
{
public static bool IsInVR() => ((ABI_RC.Core.Savior.CheckVR.Instance != null) && ABI_RC.Core.Savior.CheckVR.Instance.hasVrDeviceLoaded);
public static bool IsWorldSafe() => ((CVRWorld.Instance != null) && CVRWorld.Instance.allowFlying && CVRWorld.Instance.allowSpawnables);
public static bool IsWorldSafe() => ((CVRWorld.Instance != null) && CVRWorld.Instance.allowFlying);
public static float GetWorldFlyMultiplier()
{
float l_result = 1f;
if(CVRWorld.Instance != null)
l_result = CVRWorld.Instance.flyMultiplier;
return l_result;
}
public static void CopyGlobal(this Transform p_source, Transform p_target)
{