mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 18:39:23 +00:00
Update to build 2024r174ex2
This commit is contained in:
parent
d537cab9ba
commit
4eda3ff4e4
7 changed files with 579 additions and 592 deletions
|
@ -1,29 +1,30 @@
|
|||
using ABI.CCK.Components;
|
||||
using ABI_RC.Systems.Movement;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ml_prm
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
class GravityInfluencer : MonoBehaviour
|
||||
{
|
||||
Rigidbody m_rigidBody = null;
|
||||
PhysicsInfluencer m_physicsInfluencer = null;
|
||||
bool m_activeGravity = true;
|
||||
|
||||
void Start()
|
||||
{
|
||||
m_rigidBody = this.GetComponent<Rigidbody>();
|
||||
m_physicsInfluencer = this.GetComponent<PhysicsInfluencer>();
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
m_rigidBody.useGravity = false;
|
||||
if(m_activeGravity && ((m_physicsInfluencer == null) || !m_physicsInfluencer.enableInfluence || !m_physicsInfluencer.GetSubmerged()))
|
||||
m_rigidBody.AddForce(BetterBetterCharacterController.Instance.GravityResult.AppliedGravity * m_rigidBody.mass);
|
||||
}
|
||||
|
||||
public void SetActiveGravity(bool p_state) => m_activeGravity = p_state;
|
||||
}
|
||||
}
|
||||
using ABI.CCK.Components;
|
||||
using ABI_RC.Systems.Gravity;
|
||||
using ABI_RC.Systems.Movement;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ml_prm
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
class GravityInfluencer : MonoBehaviour
|
||||
{
|
||||
Rigidbody m_rigidBody = null;
|
||||
PhysicsInfluencer m_physicsInfluencer = null;
|
||||
bool m_activeGravity = true;
|
||||
|
||||
void Start()
|
||||
{
|
||||
m_rigidBody = this.GetComponent<Rigidbody>();
|
||||
m_physicsInfluencer = this.GetComponent<PhysicsInfluencer>();
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
m_rigidBody.useGravity = false;
|
||||
if(m_activeGravity && ((m_physicsInfluencer == null) || !m_physicsInfluencer.enableInfluence || !m_physicsInfluencer.GetSubmerged()))
|
||||
m_rigidBody.AddForce(BetterBetterCharacterController.Instance.GravityResult.AppliedGravity * m_rigidBody.mass);
|
||||
}
|
||||
|
||||
public void SetActiveGravity(bool p_state) => m_activeGravity = p_state;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -381,6 +381,7 @@ namespace ml_prm
|
|||
l_physicsInfluencer.fluidAngularDrag = 1f;
|
||||
l_physicsInfluencer.enableBuoyancy = true;
|
||||
l_physicsInfluencer.enableInfluence = false;
|
||||
l_physicsInfluencer.forceAlignUpright = false;
|
||||
float mass = l_body.mass;
|
||||
l_physicsInfluencer.UpdateDensity();
|
||||
l_body.mass = mass;
|
||||
|
@ -715,7 +716,7 @@ namespace ml_prm
|
|||
|
||||
// Restore movement if was ragdolled in water and left it
|
||||
if(m_wasSwimming)
|
||||
BetterBetterCharacterController.Instance.SetMovementMode(EasyCharacterMovement.MovementMode.Swimming);
|
||||
BetterBetterCharacterController.Instance.SetMovementMode(ECM2.Character.MovementMode.Swimming);
|
||||
|
||||
m_enabled = false;
|
||||
}
|
||||
|
|
|
@ -41,15 +41,10 @@
|
|||
<Private>false</Private>
|
||||
<SpecificVersion>false</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="EasyCharacterMovement.CharacterMovement">
|
||||
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\EasyCharacterMovement.CharacterMovement.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
<SpecificVersion>false</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="EasyCharacterMovement.Characters">
|
||||
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\EasyCharacterMovement.Characters.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
<SpecificVersion>false</SpecificVersion>
|
||||
<Reference Include="ECM2">
|
||||
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\ECM2.dll</HintPath>
|
||||
<SpecificVersion>false</SpecificVersion>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="MelonLoader">
|
||||
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue