Commit graph

12874 commits

Author SHA1 Message Date
Sal
f96ebbb2f5 Merge branch 'warp-is-cheat' into 'next'
Warp cheat adjustments

See merge request STJr/SRB2!2098
2023-08-07 18:35:20 +00:00
Sal
492fe94597 Warp cheat adjustments 2023-08-07 18:35:20 +00:00
SteelT
20e4e8a5c4 Fix crash handler showing garbage string for signal title
This fixes the signal title being shown as something like "Process killed by signal: Process killed by signal: ó>"

Did some minor cleaning while I'm also here
2023-08-07 14:06:24 -04:00
Lactozilla
f17493f379 Use -1 as the default, not 0 2023-08-07 14:30:39 -03:00
Lactozilla
b92dc42848 Add gametype parameter to G_SetCustomExitVars and G_ExitLevel
(cherry picked from commit 86367e4ec1)
2023-08-07 13:23:57 -04:00
Lactozilla
3377fa986a Remember the player's color after a team gametype 2023-08-07 13:37:07 -03:00
MIDIMan
d06098c0aa Changed P_ConvertBinaryLinedefTypes to use args[1] instead of args[3] for linedef type 442 2023-08-05 20:22:11 -04:00
Sal
9e72b78a24 Merge branch 'scale-mishap' into 'next'
Make UDMF scale compatible with ZDoom's spec

See merge request STJr/SRB2!2086
2023-08-04 20:05:35 +00:00
Sal
f11538c478 Make UDMF scale compatible with ZDoom's spec 2023-08-04 20:05:35 +00:00
Sal
be056af77e Merge branch 'total-starts-at-record-score' into 'next'
Total score starts at record score

See merge request STJr/SRB2!2091
2023-08-04 20:05:17 +00:00
SteelT
6780f89574 Add missing param to G_CheckDemoExtraFiles in G_CheckDemoForError 2023-08-04 15:59:47 -04:00
Sally Coolatta
39175c6c70 Improved version checks for demo file lists
No longer relies on the demoversion global variable (which was incorrect for a couple instances, like ghosts), now we pass the version to the file list functions. Also don't set any demo global variables when checking a demo for valid files before playback. Also also, exit said file check function asap if its a title demo instead of doing it after we've already opened the file.
2023-08-04 14:36:56 -04:00
James R
b120d00c9f Fix glibc 2.38 compile
glibc 2.38 added strlcpy and strlcat.
2023-08-03 16:46:47 -07:00
Sally Coolatta
33c7a930a7 Total score starts at record score
Means there's actually feedback for how much score you got in the current level.
2023-08-02 11:31:05 -04:00
Sal
0ce41f3e1d Merge branch 'itallreturnstonothing' into 'next'
Handle empty music lump name on music change

See merge request STJr/SRB2!2090
2023-08-02 15:24:42 +00:00
spherallic
8990b83071 Handle empty/"-" music lump name on music change 2023-08-02 17:05:38 +02:00
Sal
b7443cfa05 Merge branch 'lawofattraction' into 'next'
Fix ring attraction and homing attack math errors (resolves #1045, #1001)

Closes #1001 and #1045

See merge request STJr/SRB2!2033
2023-08-02 14:54:33 +00:00
Sal
cdf5890c5d Merge branch 'mi-lua-fixes' into 'next'
Lua fixes

See merge request STJr/SRB2!2085
2023-08-02 00:20:32 +00:00
Sal
1f799257a1 Merge branch 'extras-levelselect-fix' into 'next'
Extras level select fix

See merge request STJr/SRB2!2084
2023-08-02 00:20:21 +00:00
SMS Alfredo
24cad83287 Make both sign state and sprite2 disable models 2023-08-01 17:43:39 -05:00
SteelT
fd4c50589d Don't set recordscore to 0 in G_PlayerFinishLevel
Fixes the recordscore being reset on intermission start
2023-08-01 15:23:14 -04:00
LJ Sonic
df0c8e0557 Merge remote-tracking branch 'origin/next' into netcode-rerefactor 2023-08-01 19:00:52 +02:00
Monster Iestyn
c9efaf3a1a fix warping from SP pause level select breaking if game was started with no save slot (such as from extras menu) 2023-08-01 17:52:06 +01:00
LJ Sonic
b2441114e8 Reapply recent netcode changes 2023-08-01 18:24:07 +02:00
Monster Iestyn
e8256e2b43 allow archiving/unarchiving of skin_t userdata in netgames 2023-08-01 13:17:52 +01:00
Monster Iestyn
d91d9bf7fc add redflag, blueflag, rflagpoint and bflagpoint to Lua 2023-08-01 12:57:03 +01:00
Monster Iestyn
70928120c2 allow use of P_IsFlagAtBase in HUD code, since it doesn't actually modify anything 2023-08-01 12:45:58 +01:00
Sal
1ddc04abc6 Merge branch 'cmake-rr-ports' into 'next'
Ring Racers CMake + Debug build improvements

See merge request STJr/SRB2!2075
2023-08-01 02:29:45 +00:00
Sal
26583a9845 Ring Racers CMake + Debug build improvements 2023-08-01 02:29:45 +00:00
Sal
8630dd1644 Merge branch 'faketic-fix' into 'next'
Fix minor off-by-one error in faketic calculation

See merge request STJr/SRB2!2077
2023-08-01 02:29:05 +00:00
Sal
ca042db371 Merge branch 'fix-missing-ssf-entries' into 'next'
Fix wrong SSF_* values in Lua due to missing entries

See merge request STJr/SRB2!2080
2023-08-01 02:28:26 +00:00
Sal
e442dc262e Merge branch 'resetplayer-rodeo' into 'next'
Fix #1064

Closes #1064

See merge request STJr/SRB2!2081
2023-08-01 02:25:43 +00:00
Monster Iestyn
fb00b65f41 ...you know what, just call G_LoadGame for SP_PauseLevelSelectDef in M_LevelSelectWarp too 2023-07-31 23:36:07 +01:00
Gustaf Alhäll
ddc5cc6e48
Fix wrong SSF_* values in Lua due to missing entries 2023-07-31 22:51:50 +02:00
Monster Iestyn
77d70aaa1b relocate savedata code from P_LoadLevel to G_InitNew as well
(this doesn't fix !1064 yet, this just makes the code a bit tidier)
2023-07-31 20:06:28 +01:00
Monster Iestyn
d20ca3d919 reset emeralds and luabanks in G_InitNew, not Got_Mapcmd 2023-07-31 19:44:50 +01:00
spherallic
28ef38faad Reallocate wadfiles when adding folders 2023-07-31 15:32:22 +02:00
LJ Sonic
70ec89682e Fix minor off-by-one error in faketic calculation 2023-07-30 14:26:17 +02:00
MIDIMan
f4d944e49a Make HWR_AllowModel check for SPR2_SIGN instead of S_PLAY_SIGN 2023-07-29 20:45:10 -04:00
katsy
7634a96031 delete ASM code, remove NASM 2023-07-27 23:58:53 -05:00
katsy
5068e0fe5d Merge remote-tracking branch 'stjr/next' into kill-asm 2023-07-27 23:17:06 -05:00
Lactozilla
97311dc5b0 Use separate table for maskedtexturecol 2023-07-27 19:15:35 -03:00
LJ Sonic
7f4e82e7d9 Cleanup comments 2023-07-27 15:38:53 +02:00
LJ Sonic
6f53683519 Cleanup 2023-07-27 15:38:53 +02:00
LJ Sonic
69af7e1ea4 Add missing include directive 2023-07-27 15:38:52 +02:00
LJ Sonic
a54155e2cc Cleanup 2023-07-27 15:38:52 +02:00
LJ Sonic
8df0debd54 Split SV_SendTics into functions 2023-07-27 15:38:52 +02:00
LJ Sonic
a69204b609 Fix function name 2023-07-27 15:38:52 +02:00
LJ Sonic
e4c403408b Move net command sending to a new function 2023-07-27 15:38:52 +02:00
LJ Sonic
2639dc176d Move net command copying to a new function 2023-07-27 15:38:51 +02:00
LJ Sonic
715893ad25 Split PT_ClientCmd into functions 2023-07-27 15:38:51 +02:00
LJ Sonic
684382fc5e Add missing include directive 2023-07-27 15:38:51 +02:00
LJ Sonic
2c6bb71726 Reorder functions in d_clisrv.c 2023-07-27 15:38:50 +02:00
LJ Sonic
79356fe628 Move netgame commands to a new file 2023-07-27 15:38:50 +02:00
LJ Sonic
456c6b1a00 Remove reboundstore timeout hack 2023-07-27 15:38:50 +02:00
LJ Sonic
35dac244ef Fix clients not being able to join servers 2023-07-27 15:38:49 +02:00
LJ Sonic
2f9a2ebc86 Move comment to an appropriate place 2023-07-27 15:38:49 +02:00
LJ Sonic
b42336c232 Simplify convoluted code 2023-07-27 15:38:49 +02:00
LJ Sonic
2bd2b728bf Remove useless variable 2023-07-27 15:38:48 +02:00
LJ Sonic
5d5e2c78e4 Call all packet handlers from the same place 2023-07-27 15:38:48 +02:00
LJ Sonic
cb634402a8 Rename packet handlers to match their associated PT_ constants 2023-07-27 15:38:47 +02:00
LJ Sonic
94761d3a55 Remove outdated or misleading comments 2023-07-27 15:38:47 +02:00
LJ Sonic
39556e8af7 Add missing _pak suffix to a few packet structures 2023-07-27 15:38:47 +02:00
LJ Sonic
332a0f6b93 Add missing PT_ prefix to a few packet handlers 2023-07-27 15:38:47 +02:00
LJ Sonic
d841bfb236 Move netcode console variables to appropriate files 2023-07-27 15:38:46 +02:00
LJ Sonic
91f9f53cfc Remove unused stuff 2023-07-27 15:38:46 +02:00
LJ Sonic
de46eef068 Move gamestate handling to a new file 2023-07-27 15:38:45 +02:00
LJ Sonic
1a7f42d172 Declare data exchanged through the network to a new file 2023-07-27 15:38:45 +02:00
LJ Sonic
0ade3ae0bc Move tic and net command handling to new files 2023-07-27 15:38:45 +02:00
LJ Sonic
fc41dd78f4 Move server-side connection handling to a new file 2023-07-27 15:38:44 +02:00
LJ Sonic
e090f0e400 Move client connection handling to a new file 2023-07-27 15:38:43 +02:00
LJ Sonic
0b17e3c418 Move netcode files to a new folder 2023-07-27 15:38:42 +02:00
LJ Sonic
07bc922273 Delete netcode
Just kidding, I just deleted NONET
2023-07-27 15:34:05 +02:00
LJ Sonic
1f4c71739a Ignore duplicate PT_CLIENTJOIN packets 2023-07-27 14:45:00 +02:00
LJ Sonic
7b96efc179 Rename ConnectionRefused to be more descriptive 2023-07-27 14:45:00 +02:00
LJ Sonic
d816e4d111 Cleanup HandleConnect 2023-07-27 14:45:00 +02:00
LJ Sonic
b66353932d Remove broken joinnextround console variable 2023-07-27 14:44:59 +02:00
LJ Sonic
f501c4b250 Remove unneeded numplayerswaiting field 2023-07-27 14:44:59 +02:00
LJ Sonic
6ab9b9ae8a Remove useless condition 2023-07-27 14:44:59 +02:00
LJ Sonic
160db6383c Remove useless return value for SV_AddWaitingPlayers 2023-07-27 14:44:58 +02:00
LJ Sonic
394e925c16 Cleanup sphere redistribution 2023-07-27 14:44:58 +02:00
LJ Sonic
0053eaac00 Fix sphere redistribution 2023-07-27 14:44:58 +02:00
LJ Sonic
2de6b623c0 Move sphere redistribution to its own function 2023-07-27 14:44:58 +02:00
LJ Sonic
ecacb14fc1 Move player-node unlinking to a function 2023-07-27 14:44:57 +02:00
LJ Sonic
f1117095b7 Cleanup ResetNode 2023-07-27 14:44:57 +02:00
LJ Sonic
4c0705008e Merge node arrays into a structure 2023-07-27 14:44:57 +02:00
LJ Sonic
27b500ce9a Split packet handling switch into functions 2023-07-27 14:44:57 +02:00
LJ Sonic
60f150a826 Remove snake_ prefix 2023-07-27 14:44:57 +02:00
LJ Sonic
7725315789 Move snake minigame to its own files 2023-07-27 14:44:56 +02:00
LJ Sonic
606797a5a4 Temporarily revert recent netcode changes 2023-07-27 14:41:02 +02:00
Gustaf Alhäll
d01f25d91d
Fix FreeBSD build errors 2023-07-26 23:18:07 +02:00
James R
7261db1eee cmake: fix -DSRB2_CONFIG_ENABLE_TESTS=OFF build 2023-07-26 14:16:15 -04:00
James R
dc103330ac Rename strcasestr to nongnu_strcasestr, macro strcasestr ifndef _GNU_SOURCE
Fix for GCC C++ compiler, which always defines _GNU_SOURCE.
2023-07-26 14:03:55 -04:00
Sally Coolatta
91e915b963 Fix recordscore not including intermission bonuses 2023-07-26 13:44:43 -04:00
Sally Coolatta
42bf107b71 #define BOOL boolean -> #define boolean BOOL 2023-07-26 13:23:48 -04:00
Sal
a7964ffc69 Merge branch 'm-random-take2' into 'next'
New M_Random implementation

See merge request STJr/SRB2!1780
2023-07-26 14:53:01 +00:00
tertu marybig
9e5a828508 New M_Random implementation 2023-07-26 14:53:01 +00:00
Sal
a956aadb15 Merge branch 'forwardmove-rng-what-da-hell' into 'next'
Remove P_RandomFixed call when players are moving

See merge request STJr/SRB2!2057
2023-07-26 14:08:08 +00:00
Sal
03ae681714 Merge branch 'a_scaletoground' into 'next'
Fix A_ConnectToGround's Handling of Scaled Mobjs

Closes #1038

See merge request STJr/SRB2!2029
2023-07-26 12:17:14 +00:00
Sal
31e28bc5a1 Merge branch 'laffytaffy' into 'next'
Warn in console instead of hard erroring when attempting to modify a vanilla skincolor (resolves #1046)

Closes #1046

See merge request STJr/SRB2!2058
2023-07-26 12:14:21 +00:00
katsy
4bbf4c21c2 Warn in console instead of hard erroring when attempting to modify a vanilla skincolor (resolves #1046) 2023-07-26 12:14:21 +00:00
Gustaf Alhäll
9253a8cc54 Fix use-after-free when calling v.drawString in Lua 2023-07-26 08:12:58 -04:00
Sal
f67aea7fc2 Merge branch 'fix-softlock-empty-name' into 'next'
Fix softlocking as Sonic & Tails when Player 2 has no name

See merge request STJr/SRB2!2056
2023-07-26 12:10:24 +00:00
Sal
e96a1630b5 Merge branch 'fix-zmovement-remove-crash' into 'next'
Fix crash when P_ZMovement calls from Lua removes the object

See merge request STJr/SRB2!2054
2023-07-26 12:09:05 +00:00
Sal
99c95e2d7a Merge branch 'fix-mobjcollide-removemobj-segfault' into 'next'
Fix segfault when calling P_RemoveMobj from MobjCollide hook

See merge request STJr/SRB2!2041
2023-07-26 12:03:09 +00:00
Sal
020a7b878e Merge branch 'fix-memory-bloat' into 'next'
Clean up and simplify zone memory allocation

See merge request STJr/SRB2!2059
2023-07-26 12:01:52 +00:00
Sal
a8aee74829 Merge branch 'drawseg-clipping-optimized' into 'next'
Drawseg clipping optimized, from prboom-plus

See merge request STJr/SRB2!2067
2023-07-26 12:00:58 +00:00
Sal
8ed51989e1 Merge branch 'renderhitbox-fix' into 'next'
Small renderhitbox fix

See merge request STJr/SRB2!2068
2023-07-26 12:00:22 +00:00
Sal
7eff445d1f Merge branch 'cmake-clang-tidy' into 'next'
cmake: Add optional clang-tidy integration

See merge request STJr/SRB2!1849
2023-07-26 11:59:02 +00:00
Eidolon
101cdea022 cmake: Add optional clang-tidy integration
clang-tidy performs static analysis over the compilation unit,
producing more comprehensive compile warnings than are normally
generated by the compiler. For example, it will trace branches in a
function to find the exact conditions in which a null dereference
can occur.

Note that this produces an absurd amount of warnings for our existing
C code, and significantly slows compile times. It is pretty effective
at its job though. I think it would be good to turn on by default for
upcoming C++ code.
2023-07-26 07:58:31 -04:00
Eidolon
12b6a7cabf Don't preproc. define inline in C++ 2023-07-26 07:56:22 -04:00
Eidolon
2a8dbed336 Redefine boolean for C++ compatibility 2023-07-26 07:56:22 -04:00
Eidolon
0abe556197 cmake: Enable C++ 17 and C11 2023-07-26 07:55:26 -04:00
Sally Coolatta
dc9346a45d Add forwardmove rng backwards compat with demos 2023-07-26 07:50:47 -04:00
Sally Coolatta
29f7ecd460 Remove P_RandomFixed call when players are moving
"Add some extra randomization" is not how RNG works
2023-07-26 07:46:51 -04:00
Sal
6a0be65315 Merge branch 'brokenrecord' into 'next'
Make reading and writing of all player stats to record attack demos precise (resolves #1048)

Closes #1048

See merge request STJr/SRB2!2045
2023-07-26 11:43:32 +00:00
Sal
5eae98c829 Merge branch 'ra-file-list' into 'next'
Allow Record Attack in modified games

See merge request STJr/SRB2!2064
2023-07-26 11:35:31 +00:00
Lactozilla
e12288be3f Move these two lines after calculating the slopes 2023-07-26 00:19:55 -03:00
Lactozilla
c6c3cc3209 Drawseg clipping optimized, from prboom-plus
Co-authored-by: Sally Coolatta <tehrealsalt@gmail.com>
2023-07-26 00:06:52 -03:00
Sally Coolatta
10a8f2d05e Fix some minor warnings
- Fix `lib_getSkinSprite` overshadowing `sprites` global
- Rename terrible result_e `ok` so it stops overshadowing crap
- Remove inlining from w_wad.c since it reached the inline limit (remember kids, your compiler knows better than you these days whenever or not to inline something)
- Remove unused variable in G_PlayerReborn
2023-07-25 11:32:26 -04:00
Zwip-Zwap Zapony
0e2682d590 Add "drawonlyforplayer" and "dontdrawforviewmobj" 2023-07-25 11:05:29 -04:00
Sally Coolatta
dded352293 Harsher replay menu
Don't allow loading demos with invalid file lists at all. If you insist on doing this, it has to be done from the command line now.
2023-07-25 09:43:10 -04:00
Sally Coolatta
f99cf91d3d Promote file count to UINT16 2023-07-25 09:29:09 -04:00
Sally Coolatta
77576c3c5d Allow Record Attack in modified games
Replays now store & validate the add-on list before loading them. Custom characters can now be allowed in Record Attack.
2023-07-25 08:45:42 -04:00
Sal
1a209146d6 Merge branch 'spemblems' into 'next'
Allow obtaining ring, time & grade emblems in regular gameplay

See merge request STJr/SRB2!1752
2023-07-25 09:45:12 +00:00
Sal
ee67070547 Merge branch 'fix-no-sdl-build' into 'next'
Fix build errors when building without SDL

See merge request STJr/SRB2!2062
2023-07-25 09:44:33 +00:00
GoldenTails
4212035729 Fix errors due to declaring variables in switch bodies 2023-07-24 21:44:53 -05:00
Sal
3a52e6deb2 Merge branch 'waiting-players-intermission' into 'next'
SRB2Kart netcode ports

See merge request STJr/SRB2!2019
2023-07-24 18:03:45 +00:00
Sal
2e37995e89 Merge branch 'ping_lua' into 'next'
Port player.ping from SRB2Kart

See merge request STJr/SRB2!2025
2023-07-24 18:00:31 +00:00
Jisk
b36ca89e16 Port player.ping from SRB2Kart 2023-07-24 18:00:31 +00:00
Gustaf Alhäll
8bddf0f097
fixup! fixup! fixup! Fix build errors when building without SDL 2023-07-24 17:12:24 +02:00
Nev3r
4f97b7730b Merge branch '622-teamlives-hud' into 'next'
Resolve "Display lives in the lower left if GTR_TEAMS|GTR_LIVES is set"

Closes #622

See merge request STJr/SRB2!1579
2023-07-24 13:04:21 +00:00
Nev3r
3338d7ca74 Merge branch 'conversion-context-drift' into 'next'
UDMF context drift fixes

See merge request STJr/SRB2!2061
2023-07-24 12:49:14 +00:00
Nev3r
022ddcf363 Merge branch 'models-plus-final' into 'next'
3D models support for spritexoffset, spriteyoffset, spritexscale, spriteyscale, parity with sprite rollangle

See merge request STJr/SRB2!1840
2023-07-24 12:46:10 +00:00
spherallic
86b4f93610 Allow obtaining ring, time & grade emblems in regular SP gameplay. 2023-07-24 08:34:10 -04:00
Sal
b238a6db50 Merge branch 'shockwave-action' into 'next'
Add a standalone action for shockwaves

See merge request STJr/SRB2!1777
2023-07-24 11:01:41 +00:00
Sal
4ccba2a9d9 Merge branch 'fix-inaccurate-fps-counter' into 'next'
Fix inaccuracies in FPS counter

Closes #1047

See merge request STJr/SRB2!2047
2023-07-24 10:57:27 +00:00
Sal
08c6e76d1c Merge branch 'texnamefornum' into 'next'
Add R_TextureNameForNum and R_CheckTextureNameForNum

See merge request STJr/SRB2!1880
2023-07-24 10:43:52 +00:00
Sal
13c30ace2e Merge branch 'lua-texture-offsets-expose' into 'next'
Exposed floor/ceiling offsets and light reference to Lua.

See merge request STJr/SRB2!1884
2023-07-24 10:42:07 +00:00
Sal
25ef05230e Merge branch 'alias-improvements' into 'next'
Alias improvements

See merge request STJr/SRB2!2055
2023-07-24 10:36:21 +00:00
Sal
34f3b9c06a Merge branch 'os-lib' into 'next'
Paired down OS Lua library

See merge request STJr/SRB2!2060
2023-07-24 10:36:03 +00:00
Sally Coolatta
84e448eb63 Improve handling of team lives labels
The lives counter check is now always run, and team name is displayed in its place when its false.
2023-07-24 06:09:50 -04:00
Shane Ellis
a9d0630b15 Add lives check to Team name HUD 2023-07-24 05:18:55 -04:00
Sal
50d8becf55 Merge branch 'thespikesagaepisode3' into 'next'
Exclude non-solid objects from spike eject (resolves #706)

Closes #706

See merge request STJr/SRB2!1674
2023-07-24 09:17:07 +00:00
Sal
31d26c6f55 Merge branch 'awayview-fix' into 'next'
Call P_ResetCamera Upon Switching To/From an Away View Camera

See merge request STJr/SRB2!2011
2023-07-24 09:15:56 +00:00
Sal
f46e6883ca Merge branch 'fullscreen-toggle' into 'next'
Add fullscreen (and renderer) toggle & make windowed mode use a separate resolution

See merge request STJr/SRB2!1734
2023-07-24 09:14:21 +00:00
Sal
dd0ea188dd Merge branch 'bak2bak' into 'next'
Autobackup old gamedatas (resolves #1031)

Closes #1031

See merge request STJr/SRB2!2030
2023-07-24 09:12:05 +00:00
katsy
516e06bcba Autobackup old gamedatas (resolves #1031) 2023-07-24 09:12:05 +00:00
James R
bc9e7c1461 Disable sprite/model rotation on slopes for now 2023-07-24 05:02:31 -04:00
James R
a71a7f2710 Support spritexoffset/spriteyoffset for 3D models 2023-07-24 05:01:28 -04:00
James R
6d9512d290 Do not factor roll and pitch into model rollangle
Those transformations are applied separately so the model
tilts in 3d space.
2023-07-24 04:57:39 -04:00
James R
c065029b01 Model stretching 2023-07-24 04:53:30 -04:00
James R
7db09b657b Tilt models 2023-07-24 04:48:17 -04:00
Sally Coolatta
b6129a6d42 Add R_SpriteRotationAngle function
Gets the rotation angle for the mobj's sprite. Meant for pitch & roll later, but that part is if'd out currently and just returns mobj->rollangle
2023-07-24 04:47:07 -04:00
Sally Coolatta
7c2a241042 Remove the need for setting rotation axis in spriteinfo for models
Now it just does it like Software
2023-07-24 04:40:15 -04:00
Sally Coolatta
5c23fdda24 Fix incorrect tilts 2023-07-24 04:11:43 -04:00
Sally Coolatta
ae233b000f Remove modeltilt, use roll & pitch instead
Broken currently, about half of the slopes you can go into have the wrong tilt
2023-07-24 04:11:42 -04:00
TehRealSalt
95cbee52c6 Model tilts
- Add modeltilt variable, for more manual control of the model tilting. By default this just copies standingslope, but doesn't get cleared in the air.
- Shadows & trailing bananas now tilt to match the ground they are on.
- Rocket Sneakers & afterimages now tilt to match the player's current orientation.
2023-07-24 04:11:42 -04:00
SMS Alfredo
66f8908b03 Reset Camera only if a new camera is set / Fix Lua jank with setting awayviewmobj or awayviewtics solo 2023-07-22 20:44:22 -05:00
Gustaf Alhäll
4bc7b2da11
fixup! fixup! Fix build errors when building without SDL 2023-07-22 22:59:00 +02:00
Gustaf Alhäll
d42d1e9a45
fixup! Fix build errors when building without SDL 2023-07-22 22:56:17 +02:00
Gustaf Alhäll
69089e0858
Fix build errors when building without SDL 2023-07-22 22:47:52 +02:00
toaster
e914c19e8f P_WriteSfx: Work around the weird case sensitivity in internal instances of get_number by always providing an uppercase prefix on conversion 2023-07-21 14:41:22 +01:00
toaster
66dd952fdd Tidier conversion of string properties on linedefs to UDMF
Previously, many concatenated texture field strings were turned to text, then had that string run through get_number, then had it converted back into a string to become a stringarg.

Now, the concatenated string is copied directly to the relevant stringarg, with no intermediary steps.

This fixes an issue where a map with object or state properties would have "context drift" - breaking when the object or state list changed, due to differently ordered freeslots, or new hardcoded objects.

Affected types:
- doomednum 1110/Action 9 (Custom Mace/Chain)
- doomednum 700 and those immediately following (Ambient Sound)
- Action 4 and 414 (dash pad, play sound effect)
- Action 14 (bustable block parameters)
- Action 434 (Award Power)
- doomednum 757/Action 15 (fan particle generator)
- doomednum 1202 (bumpable hazard rock/apple spawner)
    - This one has undefined behaviour in the binary map format which was not previously forbidden. This undefined behaviour is EXTREMELY vulnerable to context drift, and so it's simply not worth creating a system to write numerical values into object types - we write an explicit name only for the intended range, and otherwise report the threat of context drift when converting.

In addition, to reduce duplicated zone memory, (sidedef_t).text and (linedef_t).text have been removed from all but the Lua API. In Lua, in binary maps, they point to the host line's stringargs - the line's text and a frontside's text will return stringargs[0], while a backside's text will return stringargs[1]. I've done my best to match the previous API as closely possible, to the point of reporting false nils if the line didn't previously have text available.

However, there are four linedef Actions for which the sidedef text will be different between builds containing and not containing this commit - 331, 332, 333 (the Character-specific linedef executors), and 443 (Call Lua Script), and only if the text is long enough to go over two lines. Given that both halves would be incomplete nonsense in this case, I'm willing to wager this minor point of discrepancy is not a breaking issue.
2023-07-20 19:42:21 +01:00
toaster
dee2489620 P_GetNodeType: Do not dereference invalid pointer for **nodedata parameter 2023-07-20 17:54:47 +01:00
Sally Coolatta
36e6a2001a Paired down OS Lua library
Pretty much removed everything except for time operations. File operations steps on the toes of the IO library, and the others were useless or invasive. The only one I wasn't sure about was `os.tmpname()`, but I think that's something that could be implemented for IO library instead if necessary.

The main reason I want this is because os.time provides an OK way to initially seed RNG on game first boot. But it would also be cute to let Lua modders be able to re-implement Christmas mode / day&night cycles themselves :p
2023-07-20 01:43:10 -04:00
Gustaf Alhäll
cee5eb47b5
Clean up and simplify zone memory allocation 2023-07-19 23:17:21 +02:00
sphere
a752e6c8e4 Merge branch 'kredits' into 'next'
Fix inconsistency with title card patch coloring (color the title card patch used in the credits to skin)

See merge request STJr/SRB2!1746
2023-07-19 19:43:15 +00:00
katsy
8cf65e8301 Fix inconsistency with title card patch coloring (color the title card patch used in the credits to skin) 2023-07-19 19:43:15 +00:00
sphere
5c87dd52ec Merge branch 'action-super-fix' into 'next'
Make A_Action super act as expected

Closes #718

See merge request STJr/SRB2!1737
2023-07-19 19:40:42 +00:00
sphere
9ea387acc0 Merge branch 'plinedefexectutefix' into 'next'
Don't cancel P_LinedefExecute early

Closes #988

See merge request STJr/SRB2!1944
2023-07-19 19:40:20 +00:00
sphere
b1e3589210 Merge branch 'hudlines-hudtime-fix' into 'next'
Fix con_hudlines being off by one, Fix con_hudtime overflow

See merge request STJr/SRB2!1931
2023-07-18 19:47:21 +00:00
Gustaf Alhäll
ff56d46827
fixup! Fix softlocking as Sonic & Tails when Player 2 has no name 2023-07-17 16:41:22 +02:00
Sally Coolatta
4a735470b9 Even more SRB2Kart netcode improvement ports
- Prevent connection timeout during the waiting gamestate from the last commit.
- Keep client connections alive during fades / other internal loops.
- More consistently timeout clients when they reach the end of BACKUPTICS.
- Dedicated servers will not run any game logic if no nodes are sending packets to it, to reduce CPU usage when there is no one interacting with your server.
  - Unlike SRB2Kart, the amount of time is configurable with the "dedicatedidletime" console variable. Setting this to 0 will disable this feature.
- CL_SendClientCmd uses exact packet types instead of magic number offsets.
2023-07-17 00:44:34 -04:00
Sally Coolatta
80bf4d6c2d Port SRB2Kart join on intermission fix
All gamestates besides GS_LEVEL are unsupported by the save game functions. This commit forces players joining during these gamestates into GS_WAITINGPLAYERS, which is a basic gamestate that just maintains the connection until we can enter the start of a new one. Also provides an extremely simple drawer for GS_WAITINGPLAYERS so the joining player knows what's going on.
2023-07-16 20:53:28 -04:00
Gustaf Alhäll
1ced8acc6a
Fix softlocking as Sonic & Tails when Player 2 has no name 2023-07-16 23:25:22 +02:00
SteelT
a90151570f Replace the alias if an alias already exists
Reduces wasting memory by having multiple aliases with the same name
2023-07-16 15:44:48 -04:00
SteelT
c55b2f2943 Print list of existing alias commands 2023-07-16 15:34:30 -04:00
Gustaf Alhäll
9a386111e2
Fix crash when P_ZMovement calls from Lua removes the object 2023-07-16 14:19:19 +02:00
SteelT
9a31064c4a Merge branch 'master' into next 2023-07-15 21:04:07 -04:00
sphere
9b16c21517 Merge branch 'net-timing' into 'next'
Prevent dropped ticcmds due to interp timing jutter

See merge request STJr/SRB2!2046
2023-07-15 17:45:00 +00:00
sphere
c29999aea7 Merge branch 'suppress-warnings' into 'master'
Suppress libdivide warnings in GCC/Clang

See merge request STJr/SRB2!1991
2023-07-15 17:38:19 +00:00
sphere
5da5b6dd86 Merge branch 'fix-exotic-prids' into 'master'
Fix PRIdS define for Windows MINGW64

See merge request STJr/SRB2!1367
2023-07-15 17:38:12 +00:00
Gustaf Alhäll
e3824b9f1b
fixup! Fix inaccuracies in FPS counter 2023-07-15 12:51:07 +02:00
sphere
7aac6a01e4 Merge branch 'better-crashes' into 'next'
Better signal handler messages

See merge request STJr/SRB2!2042
2023-07-14 22:48:26 +00:00
sphere
860767aa65 Merge branch 'increasemaxunlockables' into 'next'
Increase maximum unlockables

Closes #770

See merge request STJr/SRB2!1988
2023-07-14 22:47:37 +00:00
sphere
54d5e8154b Merge branch 'cv-truefalse' into 'next'
Add CV_TrueFalse as possible value types for console variables

See merge request STJr/SRB2!2049
2023-07-14 22:47:09 +00:00
sphere
858c9ef0b2 Merge branch 'align-memory-addresses' into 'next'
Make sure all allocations are properly aligned

See merge request STJr/SRB2!2050
2023-07-14 22:46:39 +00:00
spherallic
009e1ef157 Merge branch 'next' into fullscreen-toggle 2023-07-14 15:30:14 +02:00
sphere
bf5c4a1b0d Merge branch 'handle-missing-frame-gracefully' into 'next'
Handle missing frames for sprites gracefully

See merge request STJr/SRB2!2039
2023-07-14 13:24:53 +00:00
sphere
610ddc034c Merge branch 'removetwohundredandsixty' into 'next'
Remove generalized FOF type

Closes #1011

See merge request STJr/SRB2!2038
2023-07-14 13:17:51 +00:00
sphere
47436ee495 Merge branch 'bosszero' into 'next'
Do not consider 0 a valid executor tag for bosses

Closes #1017

See merge request STJr/SRB2!2037
2023-07-14 13:17:48 +00:00
sphere
93fa653f80 Merge branch 'fishjumpbinaryfix' into 'next'
Fix A_FishJump for custom objects in binary maps

Closes #1019

See merge request STJr/SRB2!2035
2023-07-14 13:16:55 +00:00
sphere
59685937da Merge branch 'fix-exit-automap-segfault' into 'next'
Fix segfault when exiting game with automap open

Closes #1049

See merge request STJr/SRB2!2044
2023-07-14 13:15:56 +00:00
sphere
2e2ec145dd Merge branch 'fading-callback-thread-fix' into 'next'
Do music fade callback on main thread (resolves #975)

Closes #975

See merge request STJr/SRB2!2043
2023-07-14 13:15:37 +00:00
sphere
f428759150 Merge branch 'bbox' into 'next'
Hitbox Renderer

See merge request STJr/SRB2!1838
2023-07-14 13:14:56 +00:00
spherallic
34ce172a90 Allow toggling PF_NoDepthTest for OpenGL hitboxes 2023-07-14 15:03:43 +02:00
Zwip-Zwap Zapony
8b931da6f3 Draw hitboxes last in OpenGL 2023-07-14 12:51:16 +00:00
Gustaf Alhäll
bfbbaf9f56
Make sure all allocations are properly aligned 2023-07-14 13:25:09 +02:00
AJ Martinez
8755582901 Don't submit future ticcmds if they could overwrite a needed ticcmd 2023-07-14 02:33:33 -07:00