Commit graph

86 commits

Author SHA1 Message Date
AJ Martinez
e7e719b595 Merge branch 'jartha/fix-titledemo-freeze' into 'master'
Fix replay playback not processing ticcmds after a titledemo ends

Closes #1623

See merge request kart-krew-dev/ring-racers-internal!2732
2025-08-13 21:50:38 +00:00
Antonio Martinez
662f849a71 Remove skin configuration debug prints 2025-08-13 03:57:23 -04:00
Antonio Martinez
5244648070 Store initial skin configuration for split display 2025-08-13 02:48:23 -04:00
Eidolon
892a6b8620 Merge public master 2025-08-12 16:49:14 -05:00
Eidolon
255570cfca Dynamically allocate skins
This avoids an issue where the skins array takes up a fixed, but large
amount of memory at runtime. On x86_64 linux, that array is roughly 80
megabytes in memory, most of which is unused when the game is unmodded.
Instead, we treat `skins` as a dynamically resizing array, and it is an
array-of-pointers into separate allocated `skin_t`.

This is based on Lactozilla's skin limit MR for SRB2, but I've rewritten
it because RR has diverged quite a bit.

This was verified to check every access of `skins` by using clangd's
find-all-references function. However, I have only tested plain skins,
not Lua addons, so that could afford some extra checking.
2025-08-12 15:33:00 -05:00
Antonio Martinez
9dc7453159 Toaster recs for demo hygiene 2025-08-12 04:40:04 -04:00
Antonio Martinez
1c66631e18 Also unset waitingfortally when adding ghosts 2025-08-12 04:30:34 -04:00
James R
d8732affdf Fix replay playback not processing ticcmds after a titledemo ends 2025-08-12 01:13:54 -07:00
Oni VelocitOni
39cb84f06c Merge branch 'ta-decompat' into 'master'
Replay de-compatibility

See merge request kart-krew-dev/ring-racers-internal!2715
2025-08-09 04:12:29 +00:00
Antonio Martinez
385257af73 Splits in Race gametypes 2025-08-08 20:09:14 -04:00
Antonio Martinez
fad24db244 Merge remote-tracking branch 'origin/master' into ta-rebalance-gaiden 2025-08-07 21:20:00 -04:00
Antonio Martinez
848c3d4f7a Read splits in G_DoPlayDemoEx (crash fix) 2025-08-07 04:53:24 -04:00
Antonio Martinez
024ae0f8ab More splits 2025-08-06 22:09:06 -04:00
Antonio Martinez
a11acfaf0e WIP: splits 2025-08-06 19:51:36 -04:00
Antonio Martinez
bf8511c495 Review fixup 2025-08-06 16:48:20 -04:00
Antonio Martinez
49c5318261 Don't set demo attack timing in playback 2025-08-05 21:16:12 -04:00
Antonio Martinez
fec835a544 Remove DXD_START, add demo header info for attack starts 2025-08-04 04:38:17 -04:00
Antonio Martinez
528eaf0e64 I would really like to believe that this just makes foes work in demos 2025-08-04 04:23:37 -04:00
toaster
c389922f69 Remove legacy non-json Standings handling 2025-08-03 20:31:04 +01:00
toaster
841fc2472c Remove all replay backwards compat
- Cleans up codebase in some high density regions
- Prevents crashing on the title screen due to old demos being played before we replace staffghosts
- Guarantees nothing we don't want slips in
2025-08-01 16:39:13 +01:00
Antonio Martinez
cd439be74c Bot difficulty and grading tweaks 2025-06-07 17:49:11 -04:00
toaster
e4907227fc New simpler rewind code + re-enable in UI
- Built off g_fast_forward to utilise a lot of existing structure
- Only does steps of 5 seconds and therefore isn't precise, but that's better than having to rewatch/fastforward through the entire thing
- No single frame step back or general in-motion rewind preview, but that was all overkill
2025-06-01 00:02:19 +01:00
toaster
09e23e6e18 Rip out all the rewinding code
It was all messy and none of it is called in release builds because it was so crashy in testing
2025-06-01 00:02:19 +01:00
toaster
9e0510d674 Improve Demo end handing
- Demos/Ghosts that end before ticking once are now correctly ignored. (Resolves KartKrew/RingRacers#168)
    - There was code for discovering it on read! It was just placed slightly too early, probably due to the conversion for netreplays! I'm very mad!
- As a preventative measure, demos *recorded* before ticking will simply not save in the first place.
    - This was also a frustratingly easy fix for the amount of headache it's caused us.
- Reduced the amount of copypasted boilerplate by simplifying the places where DEMOMARKER can be written (and therefore read).
    - Previously, like half the write functions tried to guess their own output size and potentially end the demo at any point.
    - At best, this will grant us a few tics of reprireve for large netgames and MAYBE a handful of seconds for time attack, The Mode In Which The Aim Is To Go Fast.
    - Instead, double the size of the deadspace buffer extension and just check to see if we've crossed into that territory.
2025-06-01 00:02:19 +01:00
Antonio Martinez
e75ffd0707 Save team assignments in demo (DEMO BREAKER) 2025-05-28 15:20:06 -04:00
AJ Martinez
90c28dc2d9 Spindash button, Strict Fastfall profile option 2025-05-05 20:36:00 -04:00
Eidolon
bd7646346b Use new containers and json 2025-03-16 18:45:11 -05:00
Eidolon
cb7f437e60 Merge public master 2025-02-13 15:48:11 -06:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
Ashnal
61e29b70a6 Fixes crashes in TA when reading ghosts
that use the new RNG classes
2024-09-10 22:20:55 -04:00
Ashnal
7da33d7e56 Update demoversion to follow up commit
d99335d5a0
Ensures fresh demos are using the new code path
2024-09-05 01:03:07 -04:00
Sally Coolatta
d99335d5a0 Fix game crashing trying to load ghost brief
Replay code was not prepped for adding/removing RNG classes yet. Oops!

G_CompatLevel was not put on the changes from the previous commit, as we are planning on breaking all the compat for the new TA changes anyways. Just preventing this being a problem in the future.
2024-08-19 19:03:00 -04:00
toaster
3170d8b90a Fix Sealed Star GP replays after retrying
- Increment DEMOVERSION
- Always write specialDamage
- Only read specialDamage if DEMOVERSION >= this

Needs testing, I am going to go eat a big lunch
2024-05-06 14:54:28 +01:00
James R
8326292a3f Fix staffghost loading for old demo version 2024-05-05 20:48:30 -07:00
James R
b79918cee8 jartha review, autoring: fix PF_AUTORING at start of replays 2024-05-05 01:39:42 -07:00
Oni
3067b827f1 Merge branch 'slope-pushback-scale' into 'master'
Fix slope pushback force to scale with mapobject and player grow/shrink scale

See merge request KartKrew/Kart!2361
2024-05-05 00:01:25 +00:00
Oni
954a95488c Merge branch 'demo-reliability' into 'master'
Demo reliability stuff

Closes #1258 and #1291

See merge request KartKrew/Kart!2335
2024-05-04 18:28:05 +00:00
Ashnal
f74280ad0a Compat level guarding 2024-05-04 14:24:44 -04:00
Oni
f43d108226 Merge branch 'polyobj-gremlin' into 'master'
Line sweep polyobject sides

See merge request KartKrew/Kart!2354
2024-05-04 00:48:42 +00:00
Eidolon
f75564371d Merge public master 2024-05-03 12:55:15 -05:00
bitten2up
cfacbd91be Fix implicit casts of int expecting 4-byte width
This fixes the issue with certain compilers that have int set to
different sizes by either explicitly casting or setting templates
manually
2024-05-03 17:53:53 +00:00
James R
44923c2b2a Line sweep polyobject sides
Gremlin III vanquished for Balloon Park elephants.
2024-05-03 00:57:06 -07:00
toaster
7390ee5442 G_SaveDemo: Resolve memory errors that could result in crashes
- Empty `demo.titlename` case
    - Don't try to save demo of name `.lmp`
    - Doesn't fall back to anything, because emptying out the name field can be reasonably treated as not wanting to save
- `demo.titlename` consists only of invalid characters
    - Don't try to save demo of name `-.lmp`
    - Falls back to the default demo title, because the user clearly wanted to save and just happened to provide invalid text
2024-05-01 19:54:09 +01:00
toaster
dcd0fe7feb G_SaveDemo: Defer save for eversavedreplay event
Prevents challenge success noise from being eaten by gamestate transition
2024-05-01 19:39:25 +01:00
Eidolon
fc3128df12 Always exit TryRunTics loop early if deferring gamestate change
Calls to F_ContinueCredits and D_StartTitle, even if deferred,
change the current gamestate. However, the tic loop in TryRunTics
may still have a couple tics to execute to catch up to current
time, and as a consequence G_Ticker may execute game logic while
the current state is not GS_LEVEL or equivalent. As a result, it is
highly likely for the game to crash.

This adds deferred credits start to the tic loop, and exits that
loop if either title or credits are supposed to start after the
current iteration, fixing this crash scenario.

Fixes KartKrew/Kart#1185
2024-04-30 22:54:42 -05:00
Sally Coolatta
6d63167a0d G_CompatLevel
Checks for gameplay differences per DEMOVERSION. Allows us to make necessary handling changes without hurting the staff ghosts.
2024-04-29 11:02:03 -04:00
Eidolon
3348c571b1 Reset demobuf even when not saving a demo 2024-04-08 19:26:02 -05:00
toaster
737e750170 Compilation fix for release build 2024-04-07 20:34:43 +01:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
toaster
a3776762ad DF_ENCORE: Warn about double #definition (aaah??)
This was right next to something I needed to modify and I don't want someone to be hurt by it later
2024-03-29 22:04:17 +00:00