]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Use RMC mob collision values (#36851)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sun, 27 Apr 2025 14:47:18 +0000 (00:47 +1000)
committerGitHub <noreply@github.com>
Sun, 27 Apr 2025 14:47:18 +0000 (00:47 +1000)
Use RMC movement values

General feedback was it's too slow to push through people but this still prevents stacking so.

Content.Shared/CCVar/CCVars.Movement.cs
Content.Shared/Movement/Systems/SharedMobCollisionSystem.cs

index 39b9836c405e9f95b9b6e85826bdb96fa73554e6..37e355b0321c1b63a3826c4dc62e61fa82512750 100644 (file)
@@ -25,14 +25,14 @@ public sealed partial class CCVars
     /// </summary>
     [CVarControl(AdminFlags.VarEdit)]
     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>
     /// Cap for how much an entity can be pushed per second.
     /// </summary>
     [CVarControl(AdminFlags.VarEdit)]
     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>
     /// 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>
     [CVarControl(AdminFlags.VarEdit)]
     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.
     /// <summary>
@@ -48,7 +48,7 @@ public sealed partial class CCVars
     /// </summary>
     [CVarControl(AdminFlags.VarEdit)]
     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>
     /// Based on the mass difference multiplies the push amount by this proportionally.
index bcc1fd6d040ab156589f07194b9873859990ffa1..fab9552271b079a76ed4038fb84fd781052d344b 100644 (file)
@@ -284,6 +284,7 @@ public abstract class SharedMobCollisionSystem : EntitySystem
                 mobMovement *= modifier;
 
                 var speedReduction = 1f - entity.Comp1.MinimumSpeedModifier;
+                speedReduction /= _penCap / penDepth;
                 var speedModifier = Math.Clamp(
                     1f - speedReduction * modifier,
                     entity.Comp1.MinimumSpeedModifier, 1f);