Commit graph

18 commits

Author SHA1 Message Date
Sally Coolatta
23a00b1d00 Move GP ranking data to grandprixinfo 2023-03-06 18:26:08 -05:00
Sally Coolatta
c61e017c38 GP rank cleanup
- Move ranking to its own file.
- gpRank (the variable) -> g_gpRank
- gpRank (the struct) -> gpRank_t
- Functions that worked on the global directly now take a pointer to a struct
- Fixed total ring increment
- Fixed final lap's lapPoints being discarded
- Capsules are now added when exiting with the rest of the stuff
2023-03-06 18:25:14 -05:00
Sally Coolatta
55de982fa3 GP ranking
Needs balancing + intermission, but mostly functional
2023-03-06 18:25:14 -05:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
toaster
ca2ecf6e9f Add "allowdemos" option to K_CanChangeRules()
It's been used interchangably as "this is a singleplayer gameplay context" and "This is a no cvar changing context". This addition repairs some behaviour which might have been inconsistent between netgame and netreplay.
2022-10-15 15:15:22 +01:00
toaster
f281f47c6f Support alternate gameplay events during GP
- Implementation details:
    - grandprixinfo.eventmode is the reference point
    - All bots have spectator applied and removed at map start depending on eventmode, and I've done my best to guard against side effects of not removing them entirely
    - You shouldn't turn off grandprixinfo.gp when turning on things like specialStage.active or bossinfo.boss when pursuing eventmode behaviour
    - Probably needs to be integrated into XD_MAP for any future netplay support, is currently disabled.
    - You technically don't have to assign a Capsules map to be the bonus and a Special Stage to be the special. A Capsules map can be assigned to a Special Stage too, and a Boss can be assigned to either of them.
    - Special Stages are still just as incomplete as they were before.
- Break the Capsules has special behaviour.
   - Timelimit starts at 20 seconds.
   - Earn 10 seconds (plus a little extra cheaty time) every capsule you destroy.
   - WIN + extra life if you bust all the capsules, COOL if you get some but run out of time, LOSE if you lose your bumper or run out of time without breaking a single capsule.
   - Supposed to also give you rings, but ran into a LOT of difficulty with this and didn't want to commit half-baked stuff, so it'll be a later project.
Also:
- Fix a long standing bug where totalring was reset between maps, preventing the sum from adding up across GP rounds and depriving you of extra lives you were owed.
- Fix an issue where Break the Capsules record attack was KARTSPEED_HARD.
- Send timelimitintics in savegames, since it's handled seperately now.
2022-10-14 18:34:43 +01:00
toaster
13c8d45764 Rework bot skin randomisation
- Instead of picking over numskins and adjust the number if it picks an already used skin, build and shuffle a list of allowed skins and pick over that instead.
- Fixes some issues with increased weighting towards the skins immediately after your rivals' skins.
- Use PR_RULESCRAMBLE instead of PR_UNDEFINED.
- Why am I doing it in this branch? I'm getting re-acquainted with how bots are handled between matches in advance of disabling them for bonus events without losing or corrupting data.
2022-10-11 18:42:04 +01:00
Sally Coolatta
358cc9f215 Bad function declaration 2022-04-02 15:24:19 -04:00
Sally Coolatta
5ffba0a678 review 2022-04-02 15:24:18 -04:00
Sally Coolatta
af3499c024 Make bots RETIRE when they NO CONTEST
They get replaced with another bot when they NO CONTEST, swapping their skin and resetting their difficulty & points.
2022-03-31 18:21:03 -04:00
Sally Coolatta
136bb1d252 Add K_CanChangeRules, and start a "single session" GP when warping to a map in single player 2020-06-06 19:45:13 -04:00
Sally Coolatta
42419f7bc6 Add comments for functions 2020-06-04 17:14:14 -04:00
Sally Coolatta
47c2c875d5 Increase bot difficulty every match based on placement, implement rival tag
Rival tag does not have an in-game indicator, but it is there & it gives the bot better odds
2020-05-14 02:18:32 -04:00
Sally Coolatta
6c8d67ab86 Give bonus points to 1st, 2nd, and 3rd place. 2020-05-13 23:15:57 -04:00
Sally Coolatta
fa5fccffc5 Implement lives system
Lose a life & restart the current race if you place below the top half. Lose all of your lives, and you get kicked to the title screen.
2020-05-13 02:14:39 -04:00
Sally Coolatta
e2d95ae9c1 Fake results for bots that didn't get to finish in time 2020-05-09 23:08:11 -04:00
Sally Coolatta
4ae81ff236 Add menu for selecting cup & other options 2020-05-09 20:03:14 -04:00
Sally Coolatta
4a3262da41 Initial GP commit
Has a rudimentary option in the menu, which spawns the specific bots & spawns you on Green Hills in singleplayer.
2020-05-09 03:42:51 -04:00