]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Fix ghosts following a moving entity causing them to be offset (#22783)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Wed, 20 Dec 2023 23:33:00 +0000 (00:33 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Dec 2023 23:33:00 +0000 (15:33 -0800)
commit5e6f350731d81b287c54bb256b68474580836124
tree8ad71609b586f46198f5344f43802e0069e29474
parent3f3669712fe85dd048c257145034cdbb95e8b15b
Fix ghosts following a moving entity causing them to be offset (#22783)

Fixes #14220

Because the entity they start following is moving, the physics system gives the follower opposing velocity to counteract, at the time the parent change happens. This happens *after* the follower system tries to clear the follower's velocity, so the follower gets some velocity that will still move them a bit off-center.

Fix is easy enough, just reset velocity *after* reparenting, not before.
Content.Shared/Follower/FollowerSystem.cs