Skip to content

Commit

Permalink
Fix sluggish AI/camera eye movement (#28327)
Browse files Browse the repository at this point in the history
* 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`.
  • Loading branch information
asciodev authored Feb 12, 2025
1 parent e6c6888 commit c895b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)


/**
Expand Down

0 comments on commit c895b91

Please sign in to comment.