Better weightless yeeting and movement (#3573)

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2021-03-08 12:10:56 +11:00
committed by GitHub
parent fcb3498bba
commit 6f3860201c
5 changed files with 26 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ namespace Content.Shared.GameObjects.Components.Movement
[DataField("grabRange")]
private float _grabRange = 0.2f;
[DataField("pushStrength")]
private float _pushStrength = 600.0f;
private float _pushStrength = 0.4f;
[ViewVariables(VVAccess.ReadWrite)]
public EntityCoordinates LastPosition { get; set; }

View File

@@ -83,6 +83,11 @@ namespace Content.Shared.Physics.Controllers
// Target velocity.
var total = (walkDir * mover.CurrentWalkSpeed + sprintDir * mover.CurrentSprintSpeed);
if (weightless)
{
total *= mobMover.PushStrength;
}
if (total != Vector2.Zero)
{
// This should have its event run during island solver soooo