From c895b91bb3b4b1aa1335cf011f99474c81c106dc Mon Sep 17 00:00:00 2001 From: asciodev <81930475+asciodev@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:52:25 -0500 Subject: [PATCH] Fix sluggish AI/camera eye movement (#28327) * Fix sluggish AI eye movement Fixes #28326 With the AI eye refactor, a `Moved()` callback was implicitly added to each call to `set_loc` on a camera eye. As camera eyes are completely invisible and do not directly interact with the game world, this extra processing isn't necessary. Removing it also removed the noted sluggishness. * Re-adds Moved() call to set_loc, adds parameters The Moved() call removed in the previous commit was not actually completely unnecessary, or newly added. Rather, new parameters were added that were not accounted form namely `momentum_change`. This commit re-adds parent proc call to set_loc for camera eyes, and adds the correct parameter values to Moved() in `/atom/movable/proc/set_loc`. --- code/game/atoms_movable.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index e9af9128d12..0dd727be629 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -217,7 +217,7 @@ /atom/movable/proc/set_loc(T, teleported=0) var/old_loc = loc loc = T - Moved(old_loc, get_dir(old_loc, loc)) + Moved(old_loc, get_dir(old_loc, loc), null, null, FALSE) /**