Commit graph

40 commits

Author SHA1 Message Date
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
Eidolon
20cb01fb94 (demo v9) Demo save unlocks and mapmusrng
Fixes KartKrew/Kart#1093
2024-03-01 17:27:41 -06:00
James R
adebfb000c Replays: keep party in sync with current viewpoints
- More and more parts of the game rely on parties
- Parties are assumed to match the displayplayers
- This fixes A/B/C/D nametags
2024-03-01 06:09:07 -08:00
James R
3179183df7 Replays: do not initialize displayplayers to INT32_MAX
- Only demo playback does this and it's a mystery why
2024-03-01 06:04:20 -08:00
Eidolon
012b82bd9c Defer StartTitle after demo conclusion
Fixes KartKrew/Kart#1055
2024-02-27 19:51:23 -06:00
Eidolon
32715fbe66 Rewrite replay standings extrainfo 2024-02-25 10:23:46 -06:00
Eidolon
7a4c4fb5bf Replace strncpy calls to strlcpy to fix warnings 2024-02-25 10:23:46 -06:00
Eidolon
0f96337124 g_demo.c -> g_demo.cpp 2024-02-25 10:23:46 -06:00
Renamed from src/g_demo.c (Browse further)