mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 10:29:22 +00:00
Drag limitation
This commit is contained in:
parent
9839169cc1
commit
427c346ba2
3 changed files with 26 additions and 12 deletions
|
@ -28,6 +28,7 @@ Optional mod's settings with [BTKUILib](https://github.com/BTK-Development/BTKUI
|
|||
* Note: Limited according to world's fly multiplier.
|
||||
* Note: Forcibly set to `1.0` in worlds that don't allow flight.
|
||||
* **Movement drag:** movement resistance; `2.0` by default.
|
||||
* Note: Forcibly set to `0.0` in worlds that don't allow flight.
|
||||
* **Angular movement drag:** angular movement resistance; `2.0` by default.
|
||||
* **Recover delay:** time delay for enabled `Auto recover` in seconds; `3.0` by default.
|
||||
* **Reset settings:** resets mod settings to default.
|
||||
|
|
|
@ -302,6 +302,7 @@ namespace ml_prm
|
|||
|
||||
OnGravityChange(Settings.Gravity);
|
||||
OnPhysicsMaterialChange(true);
|
||||
OnMovementDragChange(Settings.MovementDrag);
|
||||
}
|
||||
|
||||
internal void OnCombatDown()
|
||||
|
@ -336,9 +337,10 @@ namespace ml_prm
|
|||
{
|
||||
if(m_avatarReady)
|
||||
{
|
||||
float l_drag = (Utils.IsWorldSafe() ? p_value : 0f);
|
||||
foreach(Rigidbody l_body in m_rigidBodies)
|
||||
{
|
||||
l_body.drag = p_value;
|
||||
l_body.drag = l_drag;
|
||||
if(m_enabled)
|
||||
l_body.WakeUp();
|
||||
}
|
||||
|
|
|
@ -190,43 +190,50 @@ namespace ml_prm
|
|||
{
|
||||
PointersReaction = p_state;
|
||||
PointersReactionChange?.Invoke(p_state);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.IgnoreLocal:
|
||||
{
|
||||
IgnoreLocal = p_state;
|
||||
IgnoreLocalChange?.Invoke(p_state);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.CombatReaction:
|
||||
{
|
||||
CombatReaction = p_state;
|
||||
CombatReactionChange?.Invoke(p_state);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.AutoRecover:
|
||||
{
|
||||
AutoRecover = p_state;
|
||||
AutoRecoverChange?.Invoke(p_state);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.Slipperiness:
|
||||
{
|
||||
Slipperiness = p_state;
|
||||
SlipperinessChange?.Invoke(p_state);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.Bounciness:
|
||||
{
|
||||
Bounciness = p_state;
|
||||
BouncinessChange?.Invoke(p_state);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.ViewVelocity:
|
||||
{
|
||||
ViewVelocity = p_state;
|
||||
ViewVelocityChange?.Invoke(p_state);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ms_entries[(int)p_setting].BoxedValue = p_state;
|
||||
|
@ -242,25 +249,29 @@ namespace ml_prm
|
|||
{
|
||||
VelocityMultiplier = p_value;
|
||||
VelocityMultiplierChange?.Invoke(p_value);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.MovementDrag:
|
||||
{
|
||||
MovementDrag = p_value;
|
||||
MovementDragChange?.Invoke(p_value);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.AngularDrag:
|
||||
{
|
||||
AngularDrag = p_value;
|
||||
AngularDragChange?.Invoke(p_value);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.RecoverDelay:
|
||||
{
|
||||
RecoverDelay = p_value;
|
||||
RecoverDelayChange?.Invoke(p_value);
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ms_entries[(int)p_setting].BoxedValue = p_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue