Files
tbd-station-14/Content.Shared/CCVar/CCVars.Movement.cs
metalgearsloth 593804b517 Mob collisions (#34580)
* Conveyor optimisations

- Optimise movement for moving stuff. Better flags + less resolves + slapped parallelrobustjob on it.
- Sleeping for entities getting conveyed into walls.

* Blocker version

* Finish

* Final

* Mob collisions

* impulses

* Collision smoothing

* Locked in

* 30tps working

* r

* fixes

* Best

* Fixes + CVars

* CVars in place

* Pushies

* Opt attempt 1

* Revert "Opt attempt 1"

This reverts commit 5ccd72dcbea09261a992aa1f7f05df169a1ce676.

* Fix mispredicts

* Ready-ish

* better

* Cleanup

* Fix conveyor power mispredict

* Forgetting to actually do deltas

* Fix buckle pushes

* Bagel save

* Revert "Bagel save"

This reverts commit 1b93fda81fb852d89b89b0beae0b80f8a61165f2.

* Conveyor resave

* Fix prediction

* Mob movement rewrite

* Bandaid

* Working version

* Tentatively working

* Friction to fix cornering

* More fixes

* Revert bagel

* Revert this

* Bad parity

* Working

* Fixes

* Woops

* Doc comments

* Pen cap cvar

* StandingState cleanup and sub

* Fix downed mobs

* fish

* client

* Disable pushing on tests

* More variables

* Movement mods

* Mass diff

* 1 more tweak

* Cvar
2025-04-05 00:33:52 +11:00

51 lines
2.0 KiB
C#

using Robust.Shared.Configuration;
namespace Content.Shared.CCVar;
public sealed partial class CCVars
{
/// <summary>
/// Is mob pushing enabled.
/// </summary>
public static readonly CVarDef<bool> MovementMobPushing =
CVarDef.Create("movement.mob_pushing", false, CVar.SERVER | CVar.REPLICATED);
/// <summary>
/// Can we push mobs not moving.
/// </summary>
public static readonly CVarDef<bool> MovementPushingStatic =
CVarDef.Create("movement.pushing_static", true, CVar.SERVER | CVar.REPLICATED);
/// <summary>
/// Dot product for the pushed entity's velocity to a target entity's velocity before it gets moved.
/// </summary>
public static readonly CVarDef<float> MovementPushingVelocityProduct =
CVarDef.Create("movement.pushing_velocity_product", 0.0f, CVar.SERVER | CVar.REPLICATED);
/// <summary>
/// Cap for how much an entity can be pushed per second.
/// </summary>
public static readonly CVarDef<float> MovementPushingCap =
CVarDef.Create("movement.pushing_cap", 100f, CVar.SERVER | CVar.REPLICATED);
/// <summary>
/// Minimum pushing impulse per tick. If the value is below this it rounds to 0.
/// This is an optimisation to avoid pushing small values that won't actually move the mobs.
/// </summary>
public static readonly CVarDef<float> MovementMinimumPush =
CVarDef.Create("movement.minimum_push", 0.1f, CVar.SERVER | CVar.REPLICATED);
// Really this just exists because hot reloading is cooked on rider.
/// <summary>
/// Penetration depth cap for considering mob collisions.
/// </summary>
public static readonly CVarDef<float> MovementPenetrationCap =
CVarDef.Create("movement.penetration_cap", 0.3f, CVar.SERVER | CVar.REPLICATED);
/// <summary>
/// Based on the mass difference multiplies the push amount by this proportionally.
/// </summary>
public static readonly CVarDef<float> MovementPushMassCap =
CVarDef.Create("movement.push_mass_cap", 1.75f, CVar.SERVER | CVar.REPLICATED);
}