From 5139ecdbd2eb3a4c699d4db7ef89556d02274517 Mon Sep 17 00:00:00 2001 From: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com> Date: Thu, 22 Aug 2024 12:17:37 +0300 Subject: [PATCH] Squash ApplyLinearImpulse into SetLinearVelocity in RandomWalkController.cs (#31293) * Squash ApplyLinearImpulse into SetLinearVelocity in RandomWalkController * Late night code --- Content.Server/Physics/Controllers/RandomWalkController.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Content.Server/Physics/Controllers/RandomWalkController.cs b/Content.Server/Physics/Controllers/RandomWalkController.cs index 61d393c488..55d3d50d2a 100644 --- a/Content.Server/Physics/Controllers/RandomWalkController.cs +++ b/Content.Server/Physics/Controllers/RandomWalkController.cs @@ -77,8 +77,7 @@ internal sealed class RandomWalkController : VirtualController randomWalk.BiasVector *= 0f; var pushStrength = _random.NextFloat(randomWalk.MinSpeed, randomWalk.MaxSpeed); - _physics.SetLinearVelocity(uid, physics.LinearVelocity * randomWalk.AccumulatorRatio, body: physics); - _physics.ApplyLinearImpulse(uid, pushVec * (pushStrength * physics.Mass), body: physics); + _physics.SetLinearVelocity(uid, physics.LinearVelocity * randomWalk.AccumulatorRatio + pushVec * pushStrength, body: physics); } /// -- 2.51.2