From: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:17:37 +0000 (+0300) Subject: Squash ApplyLinearImpulse into SetLinearVelocity in RandomWalkController.cs (#31293) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=5139ecdbd2eb3a4c699d4db7ef89556d02274517;p=space-station-14.git Squash ApplyLinearImpulse into SetLinearVelocity in RandomWalkController.cs (#31293) * Squash ApplyLinearImpulse into SetLinearVelocity in RandomWalkController * Late night code --- 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); } ///