Files
Bubberstation/code/controllers/subsystem/movement
SkyratBot f42cb7ccb1 [MIRROR] ports moveloop comparison from bee(and fixes goliaths not chasing people) [MDB IGNORE] (#13818)
* ports moveloop comparison from bee(and fixes goliaths not chasing people) (#67145)

This is a port of my PR from the beestation downstream BeeStation/BeeStation-Hornet#6845.
This basically adds a proc that will check if the arguments forwarded to generate the new moveloop are identical with the ones on maybe an old loop before it allows it to overwrite it that way we won't endlessly make new loops and destroy old ones even trough there is no reason to.
closes #64510 (Goliaths don't move after you shoot them)

Now the reason why this fixes goliaths chasing others is because goliaths have a movement delay of like 4 seconds enough time for the proc adding the moveloop to chase the target to fire again and add a new moveloop with the same arguments basically overwriting the old moveloop before that one could move the goliath even once this then basically resets the timer for the goliath to move and this goes on pretty much forever the only times the goliath can move is if lag somehow allows the moveloop to move the parent atom before it can get overwritten again (very rare but happened like once during testing).
Now my PR simply stops new identical moveloops (identical in terms of arguments) to get created and to overwrite old moveloops and thus allows the moveloop to continue normally and actually fire for goliaths.

stops unnecessary moveloop datums from beeing created and also fixes a bug as a bonus

* ports moveloop comparison from bee(and fixes goliaths not chasing people)

Co-authored-by: MNarath <47279840+MNarath1@users.noreply.github.com>
2022-05-22 14:12:59 -07:00
..