aiLoop() |
Problem description:
This is an early implementation of my upkeep loop for certain mobs in the game. Would I be safer using my (already coded) cooldown system?
I seem to be getting a lot of misfires (where the modulo returns 0 multiple times within one second). I can understand lag causing problems, but it appears that the sleep isn't lasting long enough.
I've also tried not running this in the background, with the same result.