tgstation/-tg-station — pull request #5632 by GunHog (2014-11-03 01:03:51+00:00)
Title: Botcall Fix for MC lag + Tweak to floorbots Take Two

Gives bots their own ticker instead of lagging up the MC.

Hopefully nothing horrific happens this time.

- Fixes 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.

fixes #5560