Commit graph

57 commits

Author SHA1 Message Date
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
toaster
e82a626d45 G_LoadDemoInfo: Fix for compilation-halting buffer overrun 2024-03-21 22:07:15 +00:00
James R
60a1ac320a Replays: support old demo format 0x0009
- Old staff ghosts remain compatible
2024-03-19 01:25:56 -07:00
James R
5445d59d57 Replays: larger buffers for player name, skin name, color name; bump demo version 0x0009 -> 0x000A
- Name buffers are the same size as everywhere else
  - Billiards Cactus no longer gets cut short
  - Long player names no longer get cut short
- System in place to allow easily changing the buffer
  sizes across all the demo code
2024-03-19 01:23:51 -07:00
James R
2cb62c8663 devmode replay: show demo format version 2024-03-19 01:12:59 -07:00
Gunla
3d06ede948 Merge branch 'skip-ghost-player-extradata' into 'master'
Allow player extradatas past p0 in ghost demos

Closes #1175

See merge request KartKrew/Kart!2120
2024-03-17 21:53:28 +00:00
toaster
2b515fa847 G_DoPlayDemoEx: Fix compiling with ERRORMODE + cleanup
- Additional comments, since this has always been kind of a rat's nest
- Use W_CheckNumForLongName for extensionless string parameter
    - So you can play staffghosts.pk3 lumps via the `playdemo` console command
    - If missing at launch, would have been a regression compared to the previous entry in the series
- Gate the virtres support behind a `#define`
    - This isn't how we're shipping staff ghosts with the game anymore, so this would have been the only way to access them
- SKIPERRORS `#define`: Only show errors if the demo is guaranteed external, instead of suppressing them exclusively if confirmed internal
    - Hides errors for restarting a staff ghost
    - Prevents duplication of errors for restarting an external ghost
2024-03-17 16:34:41 +00:00
Eidolon
bcd4a9d93e Allow player extradatas past p0 in ghost demos
In some cases, bogus extradata is written into Record Attack demos,
which causes a crash when attempting to play RA with such a ghost. We
should skip this data too, because only extra real tic data is a problem
for ghost playback, not extradata.

Fixes KartKrew/Kart#1175
2024-03-16 22:59:19 -05:00
James R
5ffe957676 Fix staff replay loading using only the first 8 chars of the lump name
- This was causing Aquatic Cathedral and Aqua Tunnel staff
  replays to get confused for one another
  - Because for both RR_AQUATICCATHEDRAL and
    RR_AQUATUNNEL, the first 8 chars are RR_AQUAT
- Now uses the lump id directly instead of the name, which
  entirely circumvents the problem
- Fixed:
  - Time Attack menu "Replay Staff" option
  - Attract mode
  - Credits
2024-03-14 22:58:12 -07:00
AJ Martinez
3490aefa35 Merge branch 'tally-ff' into 'master'
Fast-forward through tally screen in GP

Closes #793

See merge request KartKrew/Kart!2094
2024-03-13 22:21:02 +00:00
James R
ed4c4d8363 Time Attack replays: let tally finish even if replay data ends during tally
- If tally is skipped, the replay will be cut short
- Just stop reading the demo if this happened after the
  tally started
- It's okay to let the level continue without any input
  because the player already finished (we know the result)
2024-03-12 06:18:44 -07:00
James R
29ba47459c Time Attack replays: go to intermission 2024-03-12 06:07:51 -07:00
AJ Martinez
d32ebf902e Don't leave the ghosts of ghosts lying around 2024-03-11 19:26:44 -07:00
James R
b955d98172 G_DoPlayDemo: clear camera_t
- Fixes freecam not being reset between restarts
2024-03-08 00:43:59 -08:00
AJ Martinez
79b1dab72e Don't fastforward/pause ghosts in non-attack-start gametypes 2024-03-06 02:26:02 -07:00
Oni
bf8e2a5443 Merge branch 'fix-virtual-keyboard-shift' into 'master'
Rewrite virtual keyboard gamepad-keyboard switching to be responsive

Closes #1115 and #1079

See merge request KartKrew/Kart!2023
2024-03-06 02:37:26 +00:00
James R
bea1cccdde Virtual Keyboard: rewrite keyboard-gamepad switching
- Input handling is done straight in G_MapEventsToControls
- If a keyboard event is received, switch off virtual
  keyboard
  - Removed the input lock while virtual keyboard is
    sliding away
- If a gamepad event is received, and it is a change of at
  least half the full range, switch on virtual keyboard
2024-03-05 17:03:05 -08:00
toaster
96a6fe85f1 G_LoadDemoSkins: Actually pass the skin name to R_SkinAvailableEx, idiot
Fixes the reported Emerl issue
2024-03-05 13:21:38 -08:00
toaster
7f0df71558 R_SkinAvailableEX
- Most R_SkinAvailable calls should be returning index into demo.skinlist (same numerical value as when demo was recorded), for demo sync
- A handful of general things permit exception for this
- Expose `replaynumskins` (calculated as `(demo.playback ? demo.numskins : numskins)`) to Lua
    - There's *always* more that can be done for this, but this is the minimum spec that can at least be somewhat stable
2024-03-05 13:21:38 -08:00
toaster
2bfcfeb560 Fix Skin unlocks at the beginning of replays
- DXD_JOINDATA: Actually correctly write demo data
- SetPlayerSkinByNum, bot skin iteration code: Use demo skinlist index instead of actual skin ID
2024-03-05 13:21:38 -08:00
James R
e86ae4b22b G_AddGhost, G_GetStaffGhostBrief: fix bugged unlockables code
This was causing the following crash:

    I_Error(): Ghost is not a record attack ghost DXD (ziptic = 1)
2024-03-05 02:56:37 -08:00
James R
4e763a058e Fix G_AddGhost and G_GetStaffGhostBrief to handle unlockables and mapmusrng 2024-03-03 22:39:16 -08:00
James R
e563f6271f Replays: auto-save when new recording starts
- Saves if the map changes
2024-03-03 06:31:07 -08:00
James R
8c76dee523 Virtual Keyboard: dynamically allocate cache; allow full size of replay title buffer 2024-03-03 06:31:06 -08:00
James R
38e1ae1c53 Replays: let name be changed any time until the file is saved 2024-03-03 06:30:54 -08:00
James R
8fa01ee558 Replays: use Virtual Keyboard for title entry
- This shortens the maximum title length from 64 to 31
  characters
2024-03-03 06:30:54 -08:00
SteelT
cc99ead23b Merge branch 'bugfix-roundup' into 'master'
Misc bug fixes

Closes #1097 and #1096

See merge request KartKrew/Kart!1992
2024-03-03 01:45:35 +00:00
Oni
b00255e333 Merge branch 'replay-stupid-parties' into 'master'
Emulate parties when watching replays

Closes #1090

See merge request KartKrew/Kart!1977
2024-03-02 21:29:43 +00:00
Eidolon
5fd7f4ee65 Allow G_LoadDemoInfo to load TA demos 2024-03-02 12:24:07 -06:00
Eidolon
ad538b3bb9 Fix returning to menu after TA replay 2024-03-01 17:38:22 -06:00