Commit graph

23205 commits

Author SHA1 Message Date
toaster
1f48d0b4ec K_ResetCeremony: Adjust music set
- Qualified/alt 1 is used if there's not enough music for unique First
- Loser Club/alt 0 is used if position is invalid
2023-06-03 15:01:14 +01:00
toaster
ddde841194 K_GetPodiumPosition: For consistent results, don't skip over a spectator if it's a bot.
This is not ideal and I made an entire branch about avoiding making this change... but actually, this is necessary for consistent results in K_UpdateGPRank after both normal and GPEVENT rounds, and there's nothing we can do about it.
2023-06-03 14:27:33 +01:00
toaster
1d619d10f2 Add Podium level to Stereo Mode
- LF2_HIDEINMENU is considered equivalent to LF2_FINISHNEEDED for:
    - S_SoundTestDefLocked
        - So you don't see podium stuff without having beaten a GP
    - MV_FINISHNEEDED
        - So the status is saved to gamedata and persists between launches if custom
- G_UpdateVisited is now called in K_FinishCeremony, so level is marked as beaten
2023-06-03 14:24:46 +01:00
toaster
10c18fe3fa Podium Music
Uses the multiple alt music options of the podium map's level header in a specific sequence, so it can slot in to the Stereo Mode music list natively, and so custom Podiums don't have to replace existing tracks to function.
2023-06-03 14:20:48 +01:00
toaster
5a3ed5464e P_Ticker: Do not start position music or play noises if gametype has no time between intro and start 2023-06-03 14:18:01 +01:00
toaster
3c505e2676 K_UpdateGPRank
- The previous location for updating grandprixinfo.rank.position and grandprixinfo.rank.skin was too early.
    - K_GetPodiumPosition checks player->score
    - Y_StartIntermission calls Y_CalculateMatchData
    - Y_CalculateMatchData checks K_CalculateGPGrade... which uses invalid position info to determine grade!
    - Y_CalculateMatchData updates player score
- To this end, rearrange Y_CalculateMatchData to accomodate.
    - Calls K_UpdateGPRank.
    - Then, calls K_CalculateGPGrade.
- Also called after G_UpdateVisited if no intermission occours, for general consistency.
- In addition, adjust so earlier players have port priority for skin saved to gamedata.
2023-06-03 14:11:14 +01:00
toaster
117a45422a G_SaveGameData: Fix an issue where if you somehow saved a skin with no wins as the most recent skin on GP, it'd be assigned to the first skin with any wins on your gamedata on the next load, instead of the correct question mark. 2023-06-03 14:02:46 +01:00
toaster
a2902ab1ff Use to-white fade when entering a map via skipstats 2023-06-03 00:51:51 +01:00
James R
54b3aff09f R_ProjectSprite: fix overflow in sideways perspective clipping
Multiplications of perspective values can easily overflow
and flip sign bit at far distances. Instead, divide the
left operand.
2023-06-02 16:12:54 -07:00
James R
80584c9d2f Merge branch 'infinite-draw-flag' into 'master'
MF_DRAWFROMFARAWAY: draw sprites from infinitely far away

See merge request KartKrew/Kart!1267
2023-06-02 23:12:43 +00:00
toaster
f8dd63609a On second thoughts, tie the never-force-a-retry onto skipstats, which is for direct warps. We probably want to force retries for poor performance if intermission is relevant. 2023-06-02 21:07:55 +01:00
toaster
d75ebd5453 If a nextmapoverride is used in GP, do not take a life and restart the level when exiting without having properly won. It may be some sort of secret. 2023-06-02 20:56:49 +01:00
toaster
f91f075a0d ACS: void MapWarp(str mapname, bool showintermission)
An immediate level change on command, to the specified level (via string).
Utilises the existing nextmapoverride and skipstats system, but with skipstats assumed to be the default.
2023-06-02 20:56:27 +01:00
toaster
0bec8317f3 Y_DetermineIntermissionType: Make this function the sole authority on whether an intermission occours or not.
A return to cleanliness in G_DoCompleted.
2023-06-02 20:51:48 +01:00
toaster
82b60cc585 Map types: Make more map ID types consistent as UINT16
- nextmap
- prevmap
- nextmapoverride
- G_GetFirstMapOfGametype
2023-06-02 20:27:38 +01:00
James R
4ebbabc6f5 MF_DRAWFROMFARAWAY: draw sprites from infinitely far away 2023-06-02 04:17:34 -07:00
toaster
b195d43577 Merge branch 'fix-pwr-buffer' into 'master'
Don't trash memory when reading saved PWR

See merge request KartKrew/Kart!1266
2023-06-02 09:08:50 +00:00
AJ Martinez
c716a27454 Don't trash memory when reading saved PWR 2023-06-01 21:46:54 -07:00
Oni
1ee6d196aa Merge branch 'ultra-die' into 'master'
When hit at -20 rings, die

See merge request KartKrew/Kart!1261
2023-06-02 04:44:59 +00:00
Oni
9724144e99 Merge branch 'gamedata-extension' into 'master'
Gamedata Extensions

See merge request KartKrew/Kart!1262
2023-06-02 03:40:57 +00:00
Oni
957453d02f Merge branch 'raise-textcmd-limit-dumb-version' into 'master'
Expand textcmd size byte to 16-bit word, raise MAXTEXTCMD

See merge request KartKrew/Kart!1265
2023-06-02 03:19:44 +00:00
James R
801deafa96 MAXTEXTCMD -> 512
Fixes 4P XD_ADDPLAYER
2023-06-01 20:03:23 -07:00
James R
039a73ce64 Expand textcmd size byte to 16-bit word
Raises hard limit from 255 to 65535
2023-06-01 20:03:23 -07:00
AJ Martinez
4791789bd7 Merge branch 'smooth-gentleman' into 'master'
Smooth out gentleman delay

See merge request KartKrew/Kart!1256
2023-06-01 21:54:56 +00:00
toaster
f86cf71aca Merge branch 'invalid-settargets' into 'master'
P_InitThinkers: Centralise/tidy global mobj pointer handling

See merge request KartKrew/Kart!1263
2023-06-01 12:37:29 +00:00
Eidolon
a57caf443d Merge branch 'fix-nv-ogl-crash' into 'master'
Fix a few bugs in the palette manager

See merge request KartKrew/Kart!1264
2023-06-01 11:07:05 +00:00
Eidolon
3dbd9720da Include missing algorithm header in k_collide.cpp 2023-06-01 05:15:38 -05:00
Eidolon
6d94de494e hwr2: Only upload lighttable if currently valid 2023-06-01 05:12:04 -05:00
Eidolon
99bc417978 hwr2: Upload encore lighttable to correct texture 2023-06-01 05:12:04 -05:00
Eidolon
79a01789b8 hwr2: Reset extra lighttable textures 2023-06-01 05:12:04 -05:00
Eidolon
e40b3ac1e3 hwr2: Track colormaps and lighttables tex globally 2023-06-01 05:11:48 -05:00
Sal
3a1103b7f3 Merge branch 'drop-dash-boost-type' into 'master'
Slower Drop Dash boost type (resolves #548)

Closes #548

See merge request KartKrew/Kart!1255
2023-05-31 16:44:08 +00:00
Sal
68f8e7139f Merge branch 'botcontrol' into 'master'
Add DEVELOP cvar "botcontrol" to disable bot actions

See merge request KartKrew/Kart!1260
2023-05-31 16:43:13 +00:00
Sal
1c1c234537 Merge branch 'analog-sliptiding' into 'master'
Charge wavedash boost proportional to turning angle (resolves #526)

Closes #526

See merge request KartKrew/Kart!1259
2023-05-31 16:42:15 +00:00
toaster
bca7449d15 G_LoadGameData; Improve backfilling cup windata to do the job properly 2023-05-31 13:34:18 +01:00
toaster
5f1f3a6fe3 When converting Gamedata, Profiles, and Serverstats files forwards to future versions, create backups.
- Same name, but with a ".bak" appended.
- Also prevents future versions of serverstats from being loaded into older executables.
2023-05-31 13:18:56 +01:00
toaster
1821b4f52d P_InitThinkers: Handle several important mobj cleaning tasks in one place, rather than scattered
- titlecam.mobj cannot have P_SetTarget applied when initially setting to NULL, as its previous occupant is some unknown region in memory, and modifying the reference count could in fact change some random number or address ANYWHERE IN THE ENTIRE PROGRAM.
- So we straight up wipe it rather than referenced-unset it in one place, always, for general tidiness.
- Also move skyboxcenterpnts, skyboxviewpnts, and iquetail/iquehead so it's all centralised.
2023-05-31 12:49:51 +01:00
toaster
ceb1655185 M_DrawCupSelect: Only draw Emerald on difficulties greater than Easy. 2023-05-31 11:55:20 +01:00
toaster
c0e4e4075b M_PopulateChallengeGrid: Fix memory corruption on fresh gamedata creation 2023-05-31 00:53:57 +01:00
toaster
e74d01660f K_GetGradeColor
Colors for grades.
Done as a seperate function so that future other circumstances can utilise it.
But for now, just apply to M_DrawCupSelect windata.
2023-05-30 22:15:08 +01:00
toaster
d9940fdef2 M_DrawCupSelect: Flickering Chaos/Super Emerald icon ala S3 Data Select 2023-05-30 21:23:07 +01:00
toaster
cc29c23ac6 Fix the width of the pending keys for gamedata to prevent unintentional rollover 2023-05-30 21:09:15 +01:00
toaster
0c7d66791b Expand datatype for Unlockables, emblems (Medals + nonmedals), and Conditions.
Made sure there is more than enough headroom for our current purposes.
It should be easy to double again if necessary now that the datatypes have been increased... but that would be obscene at this point
- 1024 Unlockables and 1024 Conditions (these were always tied together in slots)
- 2048 emblems (Medals + nonmedals). If we ship with ~250 maps this permits 8 Medals per map - which is higher than we intend right now but could easily fill out in patches
2023-05-30 21:08:29 +01:00
toaster
9e50fea2dc Now that Super Emerald minimap graphics are in the game, use them on the Sealed Star progression bar. 2023-05-30 13:30:22 +01:00
toaster
782da8c325 K_PlayerFinishGrandPrix: Cap RINGTOTAL to 20 when writing to totalring and grandprixinfo rank
Permitted 109/100 rings at the end of GP !?
2023-05-30 13:12:10 +01:00
AJ Martinez
8c08f759ac Use defined type for wavedash charge calcs 2023-05-30 04:54:51 -07:00
toaster
4387ea2f71 M_DrawCupSelect: Updated visuals for Cup windata per difficulty
- New Rank icons
- Use Minimap-sized Emerald instead of Battle HUD
- Shows associated character you last updated (or matched) the position with
    - Also removes the temporary printout display on G_LoadGameData.
2023-05-30 12:21:42 +01:00
toaster
956b3f985f Do not leave uninitialised memory for dummywindata best_placement emerald collection 2023-05-30 12:21:42 +01:00
toaster
989070c3f1 skinreference_t
Please note this is incompatible with gamedata from previous commits on this branch. As always, keep a backup of your last stable gamedata.

A system for record data to point to either loaded or unloaded skins.
- When writing to gamedata, stores a funny internal reference id on skinrecord_t.
- This ID is then used when writing out subsequent references ala mobjnum.
- As an example, has been attached to cup windata.
    - Also assigned based on profile skin when gamedata importprofilewins event is occouring.
    - Set to your current skin if you complete a Cup, OR if you get equal or better on any existing Cup.
- Successfully reassigned alongside unloadedskin records when a skin is added.
- TEMPORARY: Character ownership of Cup wins are displayed in your latest-log.txt, in lieu of an update to the cupgrid
2023-05-30 12:21:42 +01:00
toaster
a36213c435 G_LoadGameData: Improve indentation for gamedata skins block
Done seperately to reduce complexity of diff for the next commit.
2023-05-30 12:21:41 +01:00