Use RMC mob collision values (#36851)
Use RMC movement values General feedback was it's too slow to push through people but this still prevents stacking so.
This commit is contained in:
@@ -25,14 +25,14 @@ public sealed partial class CCVars
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[CVarControl(AdminFlags.VarEdit)]
|
[CVarControl(AdminFlags.VarEdit)]
|
||||||
public static readonly CVarDef<float> MovementPushingVelocityProduct =
|
public static readonly CVarDef<float> MovementPushingVelocityProduct =
|
||||||
CVarDef.Create("movement.pushing_velocity_product", -1f, CVar.SERVER | CVar.REPLICATED);
|
CVarDef.Create("movement.pushing_velocity_product", -9999f, CVar.SERVER | CVar.REPLICATED);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cap for how much an entity can be pushed per second.
|
/// Cap for how much an entity can be pushed per second.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[CVarControl(AdminFlags.VarEdit)]
|
[CVarControl(AdminFlags.VarEdit)]
|
||||||
public static readonly CVarDef<float> MovementPushingCap =
|
public static readonly CVarDef<float> MovementPushingCap =
|
||||||
CVarDef.Create("movement.pushing_cap", 100f, CVar.SERVER | CVar.REPLICATED);
|
CVarDef.Create("movement.pushing_cap", 25f, CVar.SERVER | CVar.REPLICATED);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Minimum pushing impulse per tick. If the value is below this it rounds to 0.
|
/// Minimum pushing impulse per tick. If the value is below this it rounds to 0.
|
||||||
@@ -40,7 +40,7 @@ public sealed partial class CCVars
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[CVarControl(AdminFlags.VarEdit)]
|
[CVarControl(AdminFlags.VarEdit)]
|
||||||
public static readonly CVarDef<float> MovementMinimumPush =
|
public static readonly CVarDef<float> MovementMinimumPush =
|
||||||
CVarDef.Create("movement.minimum_push", 0.1f, CVar.SERVER | CVar.REPLICATED);
|
CVarDef.Create("movement.minimum_push", 0f, CVar.SERVER | CVar.REPLICATED);
|
||||||
|
|
||||||
// Really this just exists because hot reloading is cooked on rider.
|
// Really this just exists because hot reloading is cooked on rider.
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -48,7 +48,7 @@ public sealed partial class CCVars
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[CVarControl(AdminFlags.VarEdit)]
|
[CVarControl(AdminFlags.VarEdit)]
|
||||||
public static readonly CVarDef<float> MovementPenetrationCap =
|
public static readonly CVarDef<float> MovementPenetrationCap =
|
||||||
CVarDef.Create("movement.penetration_cap", 0.3f, CVar.SERVER | CVar.REPLICATED);
|
CVarDef.Create("movement.penetration_cap", 0.5f, CVar.SERVER | CVar.REPLICATED);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Based on the mass difference multiplies the push amount by this proportionally.
|
/// Based on the mass difference multiplies the push amount by this proportionally.
|
||||||
|
|||||||
@@ -284,6 +284,7 @@ public abstract class SharedMobCollisionSystem : EntitySystem
|
|||||||
mobMovement *= modifier;
|
mobMovement *= modifier;
|
||||||
|
|
||||||
var speedReduction = 1f - entity.Comp1.MinimumSpeedModifier;
|
var speedReduction = 1f - entity.Comp1.MinimumSpeedModifier;
|
||||||
|
speedReduction /= _penCap / penDepth;
|
||||||
var speedModifier = Math.Clamp(
|
var speedModifier = Math.Clamp(
|
||||||
1f - speedReduction * modifier,
|
1f - speedReduction * modifier,
|
||||||
entity.Comp1.MinimumSpeedModifier, 1f);
|
entity.Comp1.MinimumSpeedModifier, 1f);
|
||||||
|
|||||||
Reference in New Issue
Block a user