tgstation/-tg-station — pull request #5623 by GunHog (2014-11-02 18:29:33+00:00)
Title: Botcall MC Lag Fix + Floorbot tweak

- Attempts to fix a major screwup in bot movement code that created
artificial lag for the entire Master Controller.
- Fixes floorbots not patrolling or performing certain functions.
- You can now toggle the anchored status on Floorbots manually. They
will still automatically anchor when fixing hull breaches.

Allow me to apologize for taking so long to come up with a fix for this. I tried several other solutions such as simply removing the sleep(4) that causes this issue (it results in 'teleportation' movement). Other times I used spawn() incorrectly, resulting in several race conditions. And then I tried to give them their own ticker, independent of the MC. The game lagged and runtimed before it even finished setting up.

Excuses aside, this solution seems to be working so far, but I welcome any more elegant solutions to fixing this issue.

fixes #5560