Used for the finish line, crossing it the correct way increments the lap count, the wrong way decrements it
Remove usability of the sector special for the finish line
Undo another check of numstarposts to force all of them to need passing to complete the stage
player laps start from 0 now, it goes to lap 1 when you initially cross the start line.
Network synchronised(?) nextwaypoint in player struct
Make the waypointheap actually a heap and not allocate memory for every individual waypoint.
No need to store id in the waypoint struct, since it can be gotten from the waypointheap now.
Update player position using distance from finish line.
Minor Bug: At the start of a race for a split second the leading players will be last.
Proposed Fix: Start on lap 0 and Force a lap count update when crossing the finish line
Includes some small refactoring of older functions - single return is a bit safer and easier to debug.
Still needs doing are: Finish Line Waypoint, Shortcut waypoints, disabled waypoints.
The actual A* method itself is a bit of a monster, but I can't figure out how to refactor it too much more.
This makes it follow the sprites a bit better on slopes. Also split into a sub-function so that Banana doesn't need the duplicated code anymore.
The accuracy can be further improved on by doing the calculation 3 extra times for every surface, for each corner of the hitbox -- it wouldn't be THAT much more expensive, but it would only make subtle differences on sector boundaries that we usually zoom past anyway, so I figured it wasn't worth it. (It'll be easy enough to do so if we decide that we want the uber-accuracy)
The truncation handling in this one spot is okay, but the compiler isn't smart
enough for it. I'm leaving it as a warning because I'd like to make a dedicated
function for handling snprintf truncation in the future.
- Add modeltilt variable, for more manual control of the model tilting. By default this just copies standingslope, but doesn't get cleared in the air.
- Shadows & trailing bananas now tilt to match the ground they are on.
- Rocket Sneakers & afterimages now tilt to match the player's current orientation.