mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 19:39:21 +00:00
Scaled jump
Minor changes
This commit is contained in:
parent
08b1909d52
commit
e73dd54e7b
11 changed files with 435 additions and 216 deletions
|
@ -1,4 +1,5 @@
|
|||
using ABI_RC.Systems.MovementSystem;
|
||||
using ABI.CCK.Components;
|
||||
using ABI_RC.Systems.MovementSystem;
|
||||
using RootMotion.FinalIK;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
@ -23,6 +24,27 @@ namespace ml_amt
|
|||
return (Keyframe[])ms_getSineKeyframes.Invoke(null, new object[] { p_mag });
|
||||
}
|
||||
|
||||
public static bool IsWorldSafe() => ((CVRWorld.Instance != null) && CVRWorld.Instance.allowFlying);
|
||||
public static float GetWorldJumpHeight()
|
||||
{
|
||||
float l_result = 1f;
|
||||
if(CVRWorld.Instance != null)
|
||||
l_result = CVRWorld.Instance.jumpHeight;
|
||||
return l_result;
|
||||
}
|
||||
public static float GetWorldMovementLimit()
|
||||
{
|
||||
float l_result = 1f;
|
||||
if(CVRWorld.Instance != null)
|
||||
{
|
||||
l_result = CVRWorld.Instance.baseMovementSpeed;
|
||||
l_result *= CVRWorld.Instance.sprintMultiplier;
|
||||
l_result *= CVRWorld.Instance.inAirMovementMultiplier;
|
||||
l_result *= CVRWorld.Instance.flyMultiplier;
|
||||
}
|
||||
return l_result;
|
||||
}
|
||||
|
||||
// Engine extensions
|
||||
public static Matrix4x4 GetMatrix(this Transform p_transform, bool p_pos = true, bool p_rot = true, bool p_scl = false)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue