- Bug Fix: Fish getting "stuck"
I'm not sure how often this actually happens, but I have gotten a couple reports of fish "swimming off" then never coming back. Going through the fish AI (heh) with a fine tooth comb, I did find a couple possibilities and managed to reproduce one of them. Basically, when fish turn around, they didn't have any deceleration on their turn speed. It was possible that depending on your framerate, they could overshoot their goal angle, try again, overshoot it again, etc. I know this could happen for a long time if your framerate was low, though I've only ever seen it when running debug, personally (with a <10 framerate). I fixed this by having their turn speed decelerate when they got close to their goal angle.
I also found a situation where if their movement delta had a length of 0, a division I was doing could end up NaN (not a number), which would work its way into their origin, which would mean future updates would forever be invalid. This always resulted in the fish being teleported to the center of the screen though, so shouldn't be the same problem as them swimming off and vanishing.
Either way, I closed up a couple of holes here, we'll see if I get any more "my fish swam off and never came back" reports.