* Add a level end screen that shows automatically when dead or level
is finished
* Lock player controls and GUI before the end screen shows
* Loop back to the main menu after finishing a level (or dying)
* Nerf combo chain score
* Add a placeholder KO animation for the player, and associated logic
Transitioning to the `next` animation frame preserved the priority,
which was a problem for enemies with a next: Hit=Idle or similar
transition, as that would give an infinite Idle loop with high
priority.
This change forces a clear of the animation priority when such a
transition occurs. This relies on the flawed linked list system, which
means that it will not happen if the new animation is just after the
current one in the source file. This is a fundamental issue due to
mixing all frames as single pointers in the anim_t structure. This will
be fixed in engine code eventually.
* Less queuing in Dijkstra by using distance[] to indicate the lowest
queued distance (dir[] still doubles down as "seen" array). Drops
iterations from ~350 to ~150, 5.5 ms -> 2.0 ms
* Less raycast attempts in the shortcut method, barely noticeable but
avoids massive spikes from 7 to 35/75 ms in Lab with 40 entities (!!)
* General optimizations with -O3 instead of -Os (0.5-1.0 ms gained per
frame for ~6 kB increase in size)
* Compute pathfinding every 4th frame for each entity, instead of every
frame
Now basically a fairly 30 FPS, and that's 30 ms rendering + 3 ms
simulation.
Bugs fixed:
* AOEs whose origin died without recognizing them as their current
attack would keep referencing a dead entity
* Entities without dash could be considered dashing when knocked back
(still fragile)