Func specifically for setting name for CPU players.
Lets anything go in offline mode, as per previous behaviour.
In online mode, attempts to append a slot-specific char before running EnsurePlayerNameIsGood (which removes characters at the end if a pre-existing match is found).
There were a few remaining cases of bot ticcmd generation editing player structures directly. Fix all of this and make as much of it pass const player pointers so this physically can't be allowed to happen ever again. Appears to improve bot sync in netgames & demos bot support, but I have not tested extensively.
- Moved destination tag off of linedef tag and into args.
- Bot controller values can be changed mid-level with ACS. (Linedefs using type 2004 will still be activated on level load.)
- Add flag to make bots fastfall
I'm not sure exactly where the bot code leaks, other than knowing its the prediction for sure (because the prediction is the only memory bots ever allocate), but srb2::finally is cool and lets me not care :)
Reuses most of the anti-grief code, but with a very low timer (5sec) and they simply hold Y when reaching it until they eventually respawn from the ring shooter.
- Added new spindashing conditions:
- In offroad.
- Trying to go up-hill on a steep slope.
- On a conveyor going the opposite direction they're trying to go. (Barren Badlands)
- Instead of checking for any spindash condition and adding to the confirm timer, it adds to the confirm timer for every single condition.
- Increased the confirm time from 2sec to 3sec to accommodate for this change.
- Fixed not using precise momentum angle, causing the low-speed scenarios spindash is intended for to not always work.
- Bots now check for spindash conditions even in damage states, allowing for spindashes after a spinout.
- Fixed the spindash confirm not decreasing over time when entering a condition and then exiting it, causing random spindashes when it wouldn't make sense.
Previously based on prediction radius, which meant it was so low that it might barely even nudge at all. Now we try to nudge a lot, but clamp the radius to make it thinner if it goes off-road.
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
A subtle change, but means the bots are thinking ahead more about the track's design, rather than just what's in front of them. Instead of just "convenient" paths, they'll actively think about which path is the shortest.
The most significant thing this effects is making them use shortcuts more often.
While I finally pushed to do this because of the epic Blue Sphere reference, I was kinda thinking about doing this for a while, because it gives more room for bots to level up during Hard GP.
I thought about just making the new level cap go up normally, but I decided on keeping the bots' passive buffs (like top speed & ring boosts) go up linearly, while rubberbanding range is kept the same.
I don't think I can properly explain it, but this basically means level 13s are a touch harder than old level 9s before, and new level 9s are touch easier than old level 9s. Basically think of it as more level range than actually making the bots harder.
The expanded range means that Hard GP can start off easier, but end harder. (And of course, Master is even more ridiculous c:)
- K_FindBotController returns the line_t directly, instead of a linedef index.
- Trick panel code is in its own function.
- Try to fix infinite bot heat death
Instead of searching for walls around the player, and then deciding to make the radius tighter if it found anyway, it instead checks if the waypoint it's trying to predict towards was blocked by any walls / hazards.
Needs adjusted some, I think its being pulled back too hard sometimes, but I am optimistic about some of the improvements I already saw.
They will no longer do it on a whim after getting bumped out of position of hitting walls, instead checks if they're trying to accelerate and they physically can't.
- If they're already turning in one direction, they are more likely to steer in that direction for objects
- Bots have to want to turn in 1 direction for a few frames in a row before it'll let them
Prevents twitching & makes them less indecisive in general