Commit graph

155 commits

Author SHA1 Message Date
NepDisk
62dac53cdd Prevent replays from asserting on start 2025-04-01 11:10:37 -04:00
GenericHeroGuy
dc791e494d Merge branch 'blankart-dev' into socmenus 2025-03-26 18:49:30 +01:00
GenericHeroGuy
016435b3b9 Fix jank attack
Consistently call D_StartTitle, don't glitch out on invalid replays etc
2025-03-25 15:55:56 +01:00
James R
a5be688b82 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
2025-03-24 13:57:04 -04:00
NepDisk
37c960a14a Various fixes from RR 2025-03-24 10:24:26 -04:00
NepDisk
fe2fc49ac1 fix copypaste errors in new bot respawn ticccmd code 2025-03-23 15:33:11 -04:00
NepDisk
f40771dd97 bot and respawn improvements
Bot respawn incrementer is based on RR's general antigrief incrementer with edits and additions
2025-03-23 14:14:46 -04:00
GenericHeroGuy
a609c7b5ce Replace prevmenu with menustack
menustack[0] replaces both menuactive and activeMenuId
Hopefully this is the last major change to the codebase...
2025-03-23 01:47:19 +01:00
NepDisk
0d6fa2178c Use stringl for netreplay wadlist 2025-03-22 11:32:18 -04:00
NepDisk
32709797a3 Remove advancedemo
0230b57aa8
2025-03-22 11:29:45 -04:00
Sally Coolatta
e1ffc206e7 Finish some unused SDL hat input support to use events rather than polling all of the time 2025-03-11 15:17:51 +01:00
GenericHeroGuy
e61c43a852 Merge branch 'blankart-dev' into newinput 2025-03-10 23:26:30 +01:00
NepDisk
a7167bfbcd Demo code updating
Still has stuff to resolve but it kinda works now. Bots should turn correctly now but replays that have bots added at the race start don't play for whatever reason. Ghosts have been fixed and no longer crash the game after they end.
2025-03-10 10:40:19 -04:00
GenericHeroGuy
84850ba8a3 Update input handling in menus to use key bindings (port-ish of f17b9484)
G_GetControlForKey -> G_ControlBoundToKey, to make it usable everywhere
2025-03-07 18:12:59 +01:00
NepDisk
464f9464e9 New botcode works now 2025-02-22 00:41:56 -05:00
GenericHeroGuy
ec5f317f28 Oops, forgot about G_LoadDemoInfo 2025-02-12 01:00:10 +01:00
toaster
551c5531d5 Enforce maximum length of 63 for map lumpname
Also, in g_demo.c, use SKIPSTRING (instead of READSTRINGN into a discard buffer)
2025-02-11 17:22:34 +01:00
toaster
13dacbb162 Demos now store map lumpname rather than mapheader ID
This was the last thing we needed to do before infinite maps. Stay tuned.
2025-02-11 15:35:19 +01:00
toaster
07c1fbf426 Move two of the three remaining NUMMAPS arrays part of the mapheader_t struct
- mapvisited and recorddata_t (previously mainrecords)
- Changed how gamedata is saved and loaded
- Change the versioncheck (funny hex provided by chengi) AND call it `developringdata.dat` in develop builds
- Fix a bunch of off-by-ones in condition and emblem data
ALSO, for Time Attack:
- Fix menu not showing off your times
- Now save times even when gamedata modified, since the menu didn't care (come back to it?)
- Don't save times or do intermission screen if the Capsule Attack ended because you lost all your bumpers
- Fix a crash adding ghosts in Capsule Attack
2025-02-11 03:47:36 +01:00
GenericHeroGuy
a78bfe2785 The rest of the changes from de1f67b 2025-02-10 21:56:07 +01:00
GenericHeroGuy
a3e531d0d4 All the save buffer fixes all at once!
* Register cv_netdemosize so it actually works
* Replace all the raw Z_Frees on demobuf with the appropriate function
* Free demobuf in G_CheckDemoStatus (yay, no more buffer == NULL asserts)
* ...allocating a buffer of uninitialized length? what
2025-02-10 00:24:17 +01:00
NepDisk
96989428b2 Fix map switch crashes
Great now its crashing over deadspace
2025-02-07 15:39:18 -05:00
James R
7449c15eba devmode DEMO: replay buffer usage displayed in real-time on the HUD
- Buffer usage in megabytes, bytes and percentage
- Approximate usage per second
- Estimated time until buffer runs out and replay is stopped
2025-02-07 14:58:50 -05:00
toaster
76dcbec741 G_DoPlayDemo: Add support for replays stored inside map vres 2025-02-07 11:12:52 -05:00
Sally Coolatta
5fee047fe6 Add functions to initialize savebuffer_t
g_demo.c is mostly unaltered because it is made of twigs.
2025-02-07 11:12:52 -05:00
NepDisk
6c8440bfff Long Map Names Port pt 3. shits broke 2025-02-05 21:57:03 -05:00
NepDisk
3350b02cc8 Long Map Names Port pt 1. 2025-02-05 17:46:21 -05:00
NepDisk
d7c9aafd2b Enforce const in bot ticcmds
710e561981
2025-02-04 21:38:13 -05:00
NepDisk
dc777890cc colorshit 2025-01-27 18:05:52 -05:00
GenericHeroGuy
43d38194fe Palremap extras (#16)
Fix demos, fix compiler warnings, at least TRY to validate patches instead
of allowing palette remaps in the entire address space
2025-01-25 18:05:08 +01:00
GenericHeroGuy
f6f43943d7 Networked compatmode 2025-01-24 18:26:49 +01:00
GenericHeroGuy
6f032ce9c8 Revert "2.1 palette pt 1"
This reverts commit d22db75409.
2025-01-24 16:57:44 +01:00
NepDisk
42cdb5997f Allow player extradatas past p0 in ghost demos
bcd4a9d93e
2025-01-09 15:16:39 -05:00
NepDisk
7f355a35ca cherrypikcs from 'miniladder-16' 2025-01-09 13:19:48 -05:00
toaster
782df794c8 Use Partial Addfile for G_LoadDemoExtraFiles as well
Still cope compared to the MP addfile codepath, but not the n^2 time cope of before.
2025-01-09 13:00:19 -05:00
Alug
4cb315bfe7 shut up some compiler warnings 2024-12-31 16:56:35 +01:00
NepDisk
1dda8c1b6d Actual fix making the game properly record and see ghosts in menu and game
It also adds a new little thing to the name to show what gamemode its in!
2024-12-25 21:36:52 -05:00
NepDisk
aef779ef24 Fix ingame ghosts 2024-12-25 18:56:37 -05:00
NepDisk
561018c26c Fix ta demos not writing
This doesn't fix them not showing up during TA but one step at a time
2024-12-25 17:50:43 -05:00
James R
7e9e259da3 Replays: reserve 1 KB of space at end of buffer as a safeguard
This should avoid buffer overruns in the middle of
recording. There is already code that checks for buffer
size around ticcmd and ghost data write. Demo header is
still unsafe with many WAD filenames written, for example.

Ghost data and ticcmd should not come close to reaching
into this extra space. At the time of writing, ghost data
can write up to 102 bytes and ticcmd 20 bytes, per player.
2024-12-20 13:20:38 -05:00
Eidolon
f9c231a77c Defer ghost deallocation til FreeGhosts
Fixes KartKrew/Kart#824

The for-loop attempts to read `g` after the object it points to has
already been freed by Z_Free. Instead, we add a new `done` field, and
mark it when hitting the end of the demo, and skip ghosts in the ghost
list which have it set.
2024-12-20 12:53:45 -05:00
James R
061c98a7d2 G_WriteAllGhostTics: check buffer size after each player's ghost data
Instead of checking it after ALL player ghost data. This
is less likely to write past the end of the demo buffer.
2024-12-20 12:46:34 -05:00
NepDisk
4b1324da69 Remove Battle capsule stuff and turn it into Item Breaker
You have to smash every itembox in a map as fast as you can. When you mash you get a pogospring and waiting gives a sneaker
2024-12-17 00:24:20 -05:00
NepDisk
1e678f660f Remove TESTERS and HOSTTESTES and use v1 assets where applicable 2024-12-16 14:23:14 -05:00
NepDisk
cf9f6fc570 Merge branch 'v2dev3' into ACS2 2024-10-21 17:30:55 -04:00
NepDisk
af277ad1d9 Split G_ExitLevel into G_BeginLevelExit and G_FinishExitLevel 2024-10-15 16:19:50 -04:00
Sally Coolatta
e23180283a 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...
2024-10-15 07:48:51 -04:00
James R
3fb806ed71 Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive 2024-10-15 07:43:52 -04:00
James R
e91701fe5b g_demo.c: use savebuffer_t 2024-10-15 07:41:38 -04:00
Sally Coolatta
07cdd2f461 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.
2024-10-15 06:41:25 -04:00