Commit graph

33 commits

Author SHA1 Message Date
toaster
17dd15b998 "Special Mode" (Sealed Stars) and "Versus Mode" (bosses) are now gametypes
* The existing structs are now exclusively for handling extra data.
    * `specialStage` has been renamed to `specialstageinfo`, to reflect that it is not the sole arbiter.
    * `specialstageinfo.valid` and `bossinfo.valid` are what must be checked before grabbing data from either struct.
        * These are turned on when the gametype extra data is successfully initialised, not on map start.
            * `K_InitBossHealthBar(...)` for `bossinfo.valid`
            * `K_InitSpecialStage(void)` for `specialstageinfo.valid`
        * `K_CanChangeRules(...)` no longer checks these
    * No longer uses duplicate encore information.
* The map command (and -warp) now guesses gametype using a general `G_GuessGametypeByTOL(UINT32)` function
    * Grabs the first gametype with an overlap between the requested TOL and the gametype's TOL.
* The cool Versus-specific intro is now checked via `K_CheckBossIntro()`.
2022-12-26 23:06:24 +00:00
toaster
f179a3523f Clean up M_UpdateUnlockablesAndExtraEmblems and related
* `gamedata->unlockpending[MAXUNLOCKABLES]` stores info to prevent the same unlock causing multiple sounds, and simplify `M_GetNextAchievedUnlock`
* Remove the DEVELOP cechotext
* Each unlock on the challenges menu updates all the unlockables, rather than just `M_CheckUnlockConditions`
* The unlock update function handles the incoming unlock sound itself if `loud` is true. This will allow us to quickly replace every sound at once when we've made a decision what to use

Also:
* Fixes the size of the savebuffer allocation in `G_SaveGame` to account for the challengegrid array.
2022-12-11 16:59:11 +00:00
toaster
845fe12b52 Conversion to using gamedata_t
A small piece of (STJr/SRB2!1756).
Due to how RR currently handles time attack records and how it WILL handle unlocks, it's not currently feasible to split everything such that you can have two independent gamedata_t... but what's done so far is certainly more sane and less dependent on global variables
Other minor refactors:
- M_UpdateUnlockablesAndExtraEmblems and M_SilentUpdateUnlockablesAndEmblems are now one function with a boolean for loudness
- Unlock prints are currently living in the console, since the cecho stuff was a little broken
2022-11-30 13:19:21 +00:00
toaster
6ab24e6055 Add extra categories and apply based on non-blocking review
- PR_RANDOMANIM // FF_ANIMATE|FF_RANDOMANIM
- PR_BUBBLE // Decorative air bubbles
- PR_RULESCRAMBLE // Netgame rule scrambing events
- PR_ITEM_DEBRIS // Item debris
- PR_ITEM_BUBBLE // Item bubbles
- PR_ITEM_BOOST // Boost
- PR_SMOLDERING // Smoldering particles
- PR_SPARKLE // Endsign and/or Emerald
- PR_MOVINGTARGET // Randomised moving targets
2022-09-24 22:01:00 +01:00
Sally Coolatta
a60d4a13a1 RNG classes, take 2
Redone version of my old branch
2022-09-19 00:04:57 -04:00
VelocitOni
8a5707ad83 Merge branch 'master' into hostcode 2022-09-13 17:08:15 -04:00
Sally Coolatta
d5a4954dd3 Profiles handle power level properly now
Overwriting the global power level all the time and not updating any code to use the profile was extremely yikes. This also allows for splitscreen players with power levels.
2022-08-30 03:51:35 -04:00
Sally Coolatta
0308ab6bd4 Scheduling commands
- `schedule_add <seconds> <command>` to add a command that runs on a recurring timer.
- `schedule_list` to print out all of the scheduled tasks.
- NEW: `schedule_clear` to revert the schedule to a blank slate.
- `schedule` cvar determines whenever or not to run the scheduled tasks. Unlike HOSTMOD, turning this off will reset the timers of the tasks, instead of freezing them.
- I did not implement HOSTMOD's ability to pick from several random command per scheduled task. Would drastically increase the code complexity when you can just use a choose command in your schedule_add for the exact same effect.
2022-08-24 21:07:41 +01:00
Sally Coolatta
ddfa9e9d88 Fix NO CONTEST Pwr.Lv when more than 1 lap behind 2022-08-15 19:47:01 -04:00
Sally Coolatta
81582e8cac Some fixes
- No longer counts position laps
- Intermission TRULY fixed?!
- Attempted code refactor & simplification for forfeiting
2022-08-14 19:30:43 -04:00
Sally Coolatta
6abc5d48c1 Make lap bonus a bit more significant
Instead of early laps being `(x / numlaps)`, it's `(x / numlaps-1)`.
2022-08-14 18:16:55 -04:00
Sally Coolatta
4899a020e0 Finish da code 2022-08-14 17:39:48 -04:00
Sally Coolatta
ebb34ff9d4 Lap based power level 2022-08-14 06:00:37 -04:00
toaster
c1f3237157 Boss API + assorted relevant bugfixes, will go over the featureset of this branch with a fine toothed comb when it's time to write the merge request description so this is all you're getting right now 2022-02-24 21:19:03 +00:00
toaster
3141ca0221 Replay fixes mark whatever
Not a pancaea for EVERYTHING, just a bunch of good stuff.

* Some issues with spectators not == true because the assignment wasn't casted.
* Netgame status (or rather its inverse) is recorded in netreplays now, to allow for power levels controlling spawn position.
* Fixed tally screen for replays to not scream infinitely at you.
* P_IsLocalPlayer now uses display players in replays.
* A bunch of good testing prints that helped me find these problems, commented out for now just in case we need them again soonish.
2021-11-28 20:03:49 +00:00
Sally Coolatta
5a98c00405 NOW we make it past p_mobj 2020-08-14 22:28:49 -04:00
Sally Coolatta
f9ca40e673 Merge branch 'master' into the-scary-22-merge 2020-08-12 20:59:09 -04:00
Sally Coolatta
b9436ee015 More fixing up
Got tired again, but now it makes it to f_finale
2020-08-11 18:46:00 -04:00
Sally Coolatta
8731c6b7a4 Another round of fixing up
- gametyperules are now fitting for kart, not applied to the whole codebase though
- a few more files compile
2020-08-11 16:13:17 -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
91b0246d99 Merge branch 'master' into grand-pricks 2020-05-31 15:53:31 -04:00
Sally Coolatta
5ad6812f17 No modify power level for beating/losing to players with no power level set
This mainly is intended for bots, but also applies to splitscreen guests who also probably shouldn't have any power level
2020-05-28 13:42:11 -04:00
Sally Coolatta
8bb145e249 Use proper scoring system in GP 2020-05-09 22:33:10 -04:00
Sally Cochenour
0051655c62 Merge branch 'master' into power-level-tweak 2020-03-25 02:04:53 -04:00
Sally Cochenour
65bd0da11d Use PWRLVRECORD_START instead of PWRLVRECORD_DEF to encourage more spread 2020-03-21 23:01:51 -04:00
James R
d46c6dc384 Kill trailing whitespace 2020-03-21 17:37:33 -07:00
TehRealSalt
9777489bb8 debug prints 2019-10-18 19:09:10 -04:00
TehRealSalt
c963a49542 Try fixing Auto causing desyncs
- Move K_SetPowerLevelScrambles to G_DoCompleted
- Fix wrong gamespeed being displayed in strings
- Add defines for kartspeed values
- Disable Easy scrambles again
- Corrupt gamedata if pwrlv is in invalid range (gets corrected in-game, and doesn't really matter to anyone who knows what you're doing, but it'll stop at least the most basic script kiddie)

Replay menu will still display wrong speed name, but it's fine in the replay itself.
2019-10-17 23:43:06 -04:00
TehRealSalt
bcd142c2a0 Start at 5000, rebalance scrambles 2019-10-03 11:36:35 -04:00
TehRealSalt
3d5676d4d6 atoi 2019-10-03 10:16:10 -04:00
TehRealSalt
12829743ae Add easy scrambles to the list now that easy is playable 2019-10-03 01:54:52 -04:00
TehRealSalt
a5ea6a9799 Merge speed/encore scrambles into the normal cvars as an "auto" option 2019-10-03 01:48:16 -04:00
TehRealSalt
38bb44e732 Separate into k_pwrlv.c, add defines to reduce amount of magic numbers 2019-09-23 08:26:42 -04:00