mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 03:19:23 +00:00
Restricted drag fix
This commit is contained in:
parent
427c346ba2
commit
1ef839af3f
2 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ Optional mod's settings with [BTKUILib](https://github.com/BTK-Development/BTKUI
|
||||||
* Note: Limited according to world's fly multiplier.
|
* Note: Limited according to world's fly multiplier.
|
||||||
* Note: Forcibly set to `1.0` in worlds that don't allow flight.
|
* Note: Forcibly set to `1.0` in worlds that don't allow flight.
|
||||||
* **Movement drag:** movement resistance; `2.0` by default.
|
* **Movement drag:** movement resistance; `2.0` by default.
|
||||||
* Note: Forcibly set to `0.0` in worlds that don't allow flight.
|
* Note: Forcibly set to `1.0` in worlds that don't allow flight.
|
||||||
* **Angular movement drag:** angular movement resistance; `2.0` by default.
|
* **Angular movement drag:** angular movement resistance; `2.0` by default.
|
||||||
* **Recover delay:** time delay for enabled `Auto recover` in seconds; `3.0` by default.
|
* **Recover delay:** time delay for enabled `Auto recover` in seconds; `3.0` by default.
|
||||||
* **Reset settings:** resets mod settings to default.
|
* **Reset settings:** resets mod settings to default.
|
||||||
|
|
|
@ -240,7 +240,7 @@ namespace ml_prm
|
||||||
m_rigidBodies.Add(l_body);
|
m_rigidBodies.Add(l_body);
|
||||||
l_body.isKinematic = true;
|
l_body.isKinematic = true;
|
||||||
l_body.angularDrag = Settings.AngularDrag;
|
l_body.angularDrag = Settings.AngularDrag;
|
||||||
l_body.drag = Settings.MovementDrag;
|
l_body.drag = (Utils.IsWorldSafe() ? Settings.MovementDrag : 1f);
|
||||||
l_body.useGravity = (!Utils.IsWorldSafe() || Settings.Gravity);
|
l_body.useGravity = (!Utils.IsWorldSafe() || Settings.Gravity);
|
||||||
l_body.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
|
l_body.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ namespace ml_prm
|
||||||
{
|
{
|
||||||
if(m_avatarReady)
|
if(m_avatarReady)
|
||||||
{
|
{
|
||||||
float l_drag = (Utils.IsWorldSafe() ? p_value : 0f);
|
float l_drag = (Utils.IsWorldSafe() ? p_value : 1f);
|
||||||
foreach(Rigidbody l_body in m_rigidBodies)
|
foreach(Rigidbody l_body in m_rigidBodies)
|
||||||
{
|
{
|
||||||
l_body.drag = l_drag;
|
l_body.drag = l_drag;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue