1) I noticed that some enemies (quite a few of them in fact - but I'm struggling to figure out the common factor(s)) can get "stuck" in their see sequence when they lose their target. It *might* be ones that have a A_CPosRefire in their attack, or it *might* be enemies that have complex see state sequences like:
Peudocode
Code: Select all
See:
Jump to See1 or See2
See1:
POSS A 4 Do_Stuff;
Loop;
See2:
POSS B 4 Do_OtherStuff;
Loop;
I have also noticed that adding a simple 0 duration A_Chase frame back into the See sequence *seems* to fix it at the expense of a barely noticeable normal sharp turn occasionally. Not ideal, but better than an enemy becoming stuck in a loop.
2) While using this, I have had a few VM aborts. They have been rare, and came after a few hours of editing enemies to include the SmoothTurn code and testing them, but they have happened. I have not had problems when using these enemies before.
The aborts happened when I spawned several enemies to fight each other (investigating problem 1) and it seems to happen when an enemy dies. The aborts are of the "tried to read from address zero" type. Unfortunately, the VM abort message doesn't seem to point to any particularly meaningful code. e.g. one time it pointed to the line highlighted in this sequence:
Spoiler:So, nothing particularly fancy there. I know that the VM Abort certainly seemed to happen when another enemy was killed by the abvoe actor. So, maybe that's just where it was in its sequence when the VM Abort happened?
Anyway, I thought you might want to know that it is possible to get the system to glitch.
Edit: However, it really is a huge improvement, when it's doing everything it's meant to: