Commit graph

21226 commits

Author SHA1 Message Date
James R
cc30118e3b Adjust formatting of git branch in game
- Detect and highlight detached HEAD on title screen and in console
- Remove '-' between branch and commit in console
2022-12-27 01:00:57 -08:00
James R
cff0def2a4 cmake: reconfigure if git HEAD changes 2022-12-27 00:59:29 -08:00
James R
5395194ed6 cmake: generate config.h at build time, always rebuild comptime.c 2022-12-27 00:59:28 -08:00
James R
aaecabf4d6 cmake: refactor GitUtilities.cmake
Remote branch name can now be resolved from detached HEAD.
2022-12-27 00:40:59 -08:00
Sally Coolatta
38d3267cca Save+load SRB2 vars on ACS threads 2022-12-27 00:19:53 -05:00
Sally Coolatta
8034fd326f Add save/load stream for ACS
Saves the majority of the VM state, but not the SRB2-specific vars ... that can come after food
2022-12-26 22:17:36 -05:00
toaster
2b32baffbb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rulesify 2022-12-26 23:31:50 +00:00
toaster
38a515f8e5 Also make Grand Prix bots spectators if the gametype doesn't support them (or if the initialisation happens into a GPEVENT) 2022-12-26 23:11:33 +00:00
toaster
a3d0c197ec Fix GAMETYPERULE_LIST 2022-12-26 23:08:06 +00:00
toaster
8bb29e340c Fix a crash in K_drawBossHealthBar exposed by the new random functions 2022-12-26 23:07:32 +00:00
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
Sally Coolatta
7a5b276ece Merge branch 'save_p-unglobal' into acs 2022-12-26 18:05:15 -05:00
Sally Coolatta
56ae811ced Contain end & size into savebuffer_t
I would've liked to make it use a single allocate function to do this very cleanly, but these cases were very clearly not meant to be standardized and use wildly different methods to allocate & free...
2022-12-26 17:45:25 -05:00
Sal
2533ebba23 Merge branch 'testers-extras' into 'master'
Extra changes for TESTERS builds

See merge request KartKrew/Kart!835
2022-12-26 22:44:43 +00:00
toaster
d29e43f80d Remove GTR_CAMPAIGN
Controlled three things: Vintage SRB2 cutscenes, a certain type of reset on map commands, and whether to go to ceremony/evaluation/credits. All three should be controlled by grandprixinfo.gp instead, since that persists cross-gametype.
2022-12-26 22:29:31 +00:00
toaster
a8a60460fb Server startup cleanup
* Don't do a shoddy attempt at guessing initial gametype in G_DeferedInitNew
* Fix map command on main menu regression (no longer HOM void)
2022-12-26 22:16:14 +00:00
toaster
eb74ec3904 Change the rules for some things selected in the previous commit.
- Only show lap count and gamespeed on rankings if GTR_CIRCUIT
- Adjust offsets for speedometer/accessability icons with GTR_BUMPERS|GTR_SPHERES
- Only show Karma on Bumpers hud with GTR_KARMA
- Permit battle fullscreen without GTR_KARMA
- Make the Break The Capsules roulette show up with GTR_CAPSULES, not absence of GTR_CIRCUIT
- Don't push Break The Capsules roulette to the item list twice
- Make the special mode switching of int_battle happen for all instances of int_battle, not just GT_BATTLE
2022-12-26 22:06:26 +00:00
Sal
d4beb91e18 Merge branch 'remove-lua_save_p' into 'save_p-unglobal'
Let LUA_Archive / LUA_UnArchive use savebuffer_t

See merge request KartKrew/Kart!837
2022-12-26 21:10:26 +00:00
toaster
185b36bd27 gametype_t
- New array of pointers to structures in memory (currently mixing static for base-game and Callocated for custom)
- Centralises a metric-ton of previously seperately handled properties into one struct
    - Gametype_Names[]
    - Gametype_ConstantNames[]
    - gametypetol[]
    - timelimits[]
    - pointlimits[]
    - gametypedefaultrules[]
- Don't attempt to guess custom gametype in Replay Hut (requires more work to make custom gametypes behave across the entire experience)
- I_Error if invalid gametype set
- gametyperules is deprecated since it will never be modified seperately from gametype (temporarily a #define, don't wanna bloat this commit too much)
2022-12-26 01:07:57 +00:00
James R
842f375920 Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive 2022-12-25 14:11:44 -08:00
James R
ea41f91e7f g_demo.c: use savebuffer_t 2022-12-25 14:04:06 -08:00
toaster
59bc094fac We don't have *one* Single Player mode - we have as many gametypes as there are, now. 2022-12-24 22:44:40 +00:00
toaster
8431e52687 All playsim-internal distinctions between Race and Battle are now gametype rules.
New:
- GTR_POWERSTONES
    - Handles spawning in Battle Emeralds (currently only works stacked with GTR_PAPERITEMS)
- GTR_ENCORE
    - Codifies that Race can use Encore and Battle can't.
- GTR_CLOSERPLAYERS
    - A gametype where players are encouraged/expected to be closer together. (All of the following was GT_BATTLE specific)
        - Drafting/tether has increased strength/effective distance
        - Spindashing is stronger
        - Invincibility chaining has less effect
        - Grow has a lower total duration
        - Flame shield is more uncontrollable

Extra functionality
- GTR_CAPSULES
    - Prevents usage of lives in Grand Prix (so Race, and the upcoming Special and Boss gametypes, can have 'em)
- GTR_CIRCUIT
    - When not present, Flame Shield has perma-full meter
    - When not present, overrides gamespeed with KARTSPEED_EASY
    - Presence of Best Lap sticker in Time Attack menu
    - Seperation between Time Attack and Break The Capsules modeattacking roulettes
- GTR_POINTLIMIT
    - Handles the switch between a gametype recording/displaying Times and Scores in a few places
    - Handles displaying "WANTED" players on the minimap

Missing simple substitutions
- A whole bunch of cases where player->bumpers was checked with gametype == GT_BATTLE rather than GTR_BUMPER
- GTR_OVERTIME handles the overtime special icon on the minimap
- GTR_BATTLESTARTS is honoured in K_DoIngamerespawn
- The Replay hut is closer to supporting custom gametypes

Removals
- GTR_LIVES
- GTR_SPECIALBOTS
    - Given that grand prix persists between modes, these are special game-controlled features and not gametype-specific.
- GTR_WANTED
    - WANTED as it existed is functionally dead
2022-12-24 22:43:00 +00:00
toaster
fbc3af2096 Pre-emptive fixes for custom gametypes
- Handle mismatched gametypes for client and server on voting screen
- I_Error when running out of gametypes
- Reduce gametype freeslots slightly to avoid colliding with VOTEMODIFIER_ENCORE
2022-12-24 21:21:03 +00:00
toaster
ab63be694a Correct NUMBASETOLNAMES, which was incorrectly set too low. 2022-12-24 21:01:25 +00:00
toaster
d95ac73f3b Remove Gametype Preference and Voting Rule Change cvars
* The consensus has moved against gametype changes in voting, so strip it out
* Encorescramble already independently controls setting Encore, so don't keep the outdated randomisation method
Done in this branch because it uses gametype constants directly, both in a cvar and function, and I want to get rid of as many of those as possible
2022-12-24 17:03:36 +00:00
toaster
78bc4fdac9 Further changes in anticipation of potential future TESTER builds.
* Create a seperate `unlocks.pk3` so we can customise what the testers have.
* Make TESTERS(/HOSTTESTERS) builds have their own default gamedata.
2022-12-24 16:21:24 +00:00
Sally Coolatta
8bdb5bdb77 Make save_p / savebuffers not global
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.

Also fixed some scary mix-ups in some of the Lua archiving code.
2022-12-23 08:32:01 -05:00
Sally Coolatta
7f9ae90f88 Don't compile ACSVM's C API
No longer required
2022-12-23 05:26:12 -05:00
Sally Coolatta
8eef5efa95 Fully port the ACS integration to C++ 2022-12-23 04:38:05 -05:00
Sally Coolatta
88ffab9f3c Add ACSVM building to CMake
Currently this breaks some parts of the ACS functionality ... before I made a handful of small extensions to ACSVM's slightly-limited C API myself, and I didn't get them into the actual repo yet.

But now that we've moved to actual C++ compiling, I will likely just flat-out rewrite the SRB2 side of the code in C++ so it can use the library directly.
2022-12-22 09:44:38 -05:00
Sally Coolatta
2a790d10da Merge branch 'master' into acs 2022-12-22 08:24:21 -05:00
Oni
3101cf25cd Merge branch 'special-stages' into 'master'
Special Stages

See merge request KartKrew/Kart!778
2022-12-22 10:58:44 +00:00
Sally Coolatta
86c3a8ab78 Fix Gachabom merge 2022-12-22 05:35:35 -05:00
Sally Coolatta
82df346417 Merge branch 'master' into special-stages 2022-12-22 05:18:56 -05:00
Oni
8222b4d52b Merge branch 'ring-respawn-fuck' into 'master'
Make ring respawn a division

See merge request KartKrew/Kart!833
2022-12-22 10:18:28 +00:00
Sally Coolatta
40bc79a9d4 Merge branch 'master' into ring-respawn-fuck 2022-12-22 03:40:11 -05:00
Sal
1662414e0e Merge branch 'neutral-explosion-hitlag' into 'master'
Add half hitlag to invulnerable players if they would normally take damage

Closes #364

See merge request KartKrew/Kart!814
2022-12-22 08:37:47 +00:00
Sally Coolatta
ae8df1b97b Merge branch 'master' into neutral-explosion-hitlag 2022-12-22 02:45:08 -05:00
Oni
7af133d378 Merge branch 'spring-overflow' into 'master'
Fix spring stack overflow

Closes #377

See merge request KartKrew/Kart!831
2022-12-22 07:43:39 +00:00
Sally Coolatta
ba7b2f3fc9 Merge branch 'master' into ring-respawn-fuck 2022-12-22 02:27:39 -05:00
Oni
58c4f6009f Merge branch 'noclip-isnt-noclipthing' into 'master'
Alter MF_NOCLIP behavior

See merge request KartKrew/Kart!829
2022-12-22 07:25:54 +00:00
Sally Coolatta
c804129f3a Merge branch 'master' into spring-overflow 2022-12-22 02:25:46 -05:00
Oni
580de12d24 Merge branch 'fix-load-savegame' into 'master'
Fix netsave loading crash from saving gamedata

Closes #380

See merge request KartKrew/Kart!832
2022-12-22 07:25:15 +00:00
James R
90903e999f Fix MAXAVAILABILITY loop 2022-12-21 23:17:49 -08:00
James R
18acc54706 Merge branch 'cmake-testers' into 'master'
Add TESTERS and HOSTTESTERS builds to CMake options

See merge request KartKrew/Kart!830
2022-12-22 07:02:20 +00:00
Sally Coolatta
9c9d2934c5 Make ring respawn a division
Lets it stay very long for 1v1 like we want, but not matter the closer it gets to 8 players. Tired of people spamming rings to compensate for this problem :V
2022-12-22 01:53:50 -05:00
James R
a29d43d3b5 Restore save_p after P_LoadLevel
P_LoadLevel calls some functions that save gamedata and
unset save_p.
2022-12-21 22:45:46 -08:00
Sally Coolatta
0d8e13e942 Fix spring stack overflow
Closes #377
2022-12-22 01:35:08 -05:00
James R
d496e0f298 Add Tyron's invinc/grow blocked hit sfx 2022-12-21 08:35:26 -08:00