Mob movement rewrite (#35931)

* 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

* Fix conveyor power mispredict

* 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

* a

* Reviewed

* Funky re-save

* Fix velocity

* Table fix

* Review

* a
This commit is contained in:
metalgearsloth
2025-03-28 09:29:02 +11:00
committed by GitHub
parent e98df217e2
commit 948588399c
8 changed files with 360 additions and 131 deletions

View File

@@ -32,7 +32,7 @@ namespace Content.Shared.Movement.Components
/// <summary>
/// Should our velocity be applied to our parent?
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("toParent")]
[DataField]
public bool ToParent = false;
public GameTick LastInputTick;
@@ -43,6 +43,12 @@ namespace Content.Shared.Movement.Components
public MoveButtons HeldMoveButtons = MoveButtons.None;
// I don't know if we even need this networked? It's mostly so conveyors can calculate properly.
/// <summary>
/// Direction to move this tick.
/// </summary>
public Vector2 WishDir;
/// <summary>
/// Entity our movement is relative to.
/// </summary>
@@ -65,7 +71,6 @@ namespace Content.Shared.Movement.Components
/// If we traverse on / off a grid then set a timer to update our relative inputs.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan LerpTarget;
public const float LerpTime = 1.0f;