Commit graph

1333 commits

Author SHA1 Message Date
James R
3939966a7f Fix saycmd message buffer handling
- Properly bounds check say_pak
- Fix off-by-one read in Got_Saycmd
2024-05-20 16:42:31 -07:00
AJ Martinez
0647791c32 Mindelay fixes
- Don't apply mindelay to clients that are already slower than their mindelay, WTF
- Don't double apply mindelay to hosts to compensate for the above, WTF
2024-05-15 22:31:26 -07:00
toaster
3a8de19aa4 TryRunTics: Handle deferred title/credits continue outside inner tic loop, don't bail outside of level gamestate
Fixes netxcmds not being processed locally in time to init rivals properly
2024-05-02 20:28:15 +01:00
Oni
32c43044cb Merge branch 'mindelay-client' into 'master'
Fix delay indicator online

See merge request KartKrew/Kart!2311
2024-05-02 12:58:20 +00: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
James R
3e5f6466a0 Base gentlemen delay on lowest average
Was previously based on the delay at the moment of
calculation, which may fluctuate. I changed it to use the
average because the number was flickering in the HUD.
2024-04-27 15:44:47 -07:00
James R
8103bd21c1 HUD: fix delay indicator online
- As a bonus, the mindelay setting of other players is now
  visible to everyone
2024-04-27 15:44:43 -07:00
James R
e0c33596e8 Sync mindelay setting to server
- Adds playerdelaytable, no UX changes
2024-04-27 04:09:21 -07:00
AJ Martinez
632d9b4d0d More lax + more helpful RRID timestamp errors 2024-04-25 18:02:43 -07:00
toaster
2caa5ff018 Dedicated server -spoilers startup parameter
Servers should get enough free for a healthy launch ecosystem, but not everything.
We'll give the relevant password out after, like, the first week probably? Please be patient, commit-diver
2024-04-12 14:17:33 +01:00
Sally Coolatta
1e40d08cec HandleConnect handles bots 2024-04-11 17:41:06 -04:00
Sally Coolatta
af9ddb5519 Keep PT_SERVERINFO struct the same in all builds
Sends the commit hash in all builds now, just doesn't do anything with it in release builds. Makes web view development easier according to Tyron.
2024-04-05 11:08:09 -04:00
toaster
7f6de407f1 Copyright update: Add Kart Krew (2024) in general for high-traffic inherited sourcefiles 2024-04-02 17:42:38 +01:00
toaster
0aaf5649dd Server Browser last-minute adjustments
- Menu string for server count
- Thin string for server name
- Gear instead of difficulty (renamed to keep the old assets just in case online GP)
- Pwr fixes
    - Handle -1 case as "No Pwr"
    - Adjust draw coords a little
- Custom gametype support
    - Shows name as net-communicated instead of Pwr
    - Affects d_clisrv side a little bit too
        - All custom gametypes MUST show up on the Modded room, no exceptions
        - Cache gametype info instead of constant strcmp
2024-03-29 22:04:17 +00:00
toaster
2a8ddd4a40 SV_SendServerInfo: Use K_UsingPowerLevels instead of plain cv_kartusepwrlv 2024-03-29 22:04:17 +00:00
toaster
31288a6f21 Introduce a variant of M_DrawEggaChannel aligned to center or left depending on parameter 2024-03-29 22:04:17 +00:00
James R.
b3320d5ef2 Merge branch 'addfile-order' into 'master'
re-order Addons Menu updating (resolves #835)

Closes #835

See merge request KartKrew/Kart!2158
2024-03-25 23:38:46 +00:00
toaster
6e671d4894 Re-order when refreshdirmenu is wiped
The problem with adding files mid-netgame was that the order is:
- menu code sends netxcmd for addfile
- getpackets processes addfile, sets refreshdirmenu
- NEW GAMETIC
- refreshdirmenu is set to 0
- menu code looks for refreshdirmenu, comes up empty

Now, the order is:
- menu code sends netxcmd for addfile
- refreshdirmenu is set to 0
- getpackets processes addfile, sets refreshdirmenu
- NEW GAMETIC
- menu code looks for refreshdirmenu, successfully finds it
- refreshdirmenu is set to 0
2024-03-24 12:29:47 +00:00
AJ Martinez
bca0b48f45 Merge branch 'challenge-final' into 'master'
Challenge Final

See merge request KartKrew/Kart!2140
2024-03-24 06:47:32 +00:00
toaster
6a08198477 Merge branch 'fix-interp-sped-up-tics' into 'master'
Fix titlemap camera bug

Closes #799

See merge request KartKrew/Kart!2129
2024-03-21 21:55:02 +00:00
toaster
32afe48aab M_StartControlPanel: Guarantee titlemap contexts have internal server stopped when entering menu
Guarantees netUnlocked is correctly updated in most contexts, since that's dependent on SV_ResetServer, which isn't called if a server is running
Also guarantees titlemapinaction isn't true during regular play
2024-03-19 19:30:16 +00:00
James R
95216563a6 Interp: do not update view interpolation state during sped-up tics
- If you called R_ResetViewInterpolation once but G_Ticker
  got called more than once, then the effect of
  R_ResetViewInterpolation would be cancelled
- This should be a comprehensive solution to the titlemap
  camera bug
- Multiple tests:
  - -skipintro
  - -warp, then exit to title
  - map command, then exit to title
  - Wait for attract demo, then skip and exit to title
2024-03-18 04:15:52 -07:00
James R
7abe285f84 Refactor: replace references to cv_timescale with I_GetTimeScale 2024-03-18 02:42:21 -07:00
SteelT
9a25504690 Use button prompts on the connect screen
Closes KartKrew/Kart#470
2024-03-07 22:54:15 -05:00
James R
3be8a72155 Update button states during wipes
- All inputs create input events that get stored in a very
  small buffer
- Normally, the game listens for some inputs and then
  immediately processes them and updates the button state
  in-game
- However, during wipes the processing step would not
  happen and it would just let the events pile up
- Because the buffer is small though, it would quickly
  fill up and lose some events
- This would lead to button states getting stuck on some
  controllers if you released a button during a wipe
  - If you spun an analog stick around, this would cause
    it to happen more frequently, because there is a new
    event for every slight change of an analog stick's
    position
2024-03-03 17:48:11 -08:00
AJ Martinez
a1fd0f5353 Merge remote-tracking branch 'origin/master' into move-your-car 2024-03-02 01:25:47 -07:00
Oni
1990c10635 Merge branch 'title-tempest' into 'master'
Title and Credits attract fixes

Closes #1056 and #1055

See merge request KartKrew/Kart!1950
2024-02-29 10:25:25 +00:00
AJ Martinez
64dd306138 Revert "Make ticcmd throwdir -1, 0, or 1, add deadzone"
This reverts commit 9028668104.
2024-02-28 18:33:07 -07:00
Eidolon
6ac53d8eed Ensure deferred title start at the end of tic 2024-02-27 20:32:43 -06:00
SteelT
f4f6e27dda Fix players RRID getting wiped on join
Fixes #1075
2024-02-26 04:00:37 -05:00
James R
4ee00d4333 Pass const pointer to all netxcmd handlers
Ensure buffer data is read-only and not modified by
handler
2024-02-11 05:42:07 -08:00
Oni
3a4506dae2 Merge branch 'fix-replay-splits' into 'master'
Fix splitscreen viewport and delay counter carrying over from replays into play contexts

Closes #464

See merge request KartKrew/Kart!1902
2024-02-06 13:21:13 +00:00
Oni
74eee5e718 Merge branch 'server-name-sanitize' into 'master'
Sanitize server name/contact, fully support caret codes

Closes #1008

See merge request KartKrew/Kart!1906
2024-02-06 13:20:08 +00:00
AJ Martinez
92bbd82c73 Add "Move Your Car" for antigrief 2024-02-05 20:09:04 -07:00
Oni
4ea946067a Merge branch 'srb2-tidy' into 'master'
Clear out unused SRB2/Kart stuff from info tables

See merge request KartKrew/Kart!1811
2024-02-03 19:40:52 +00:00
James R
a5c4b3705f Parse caret codes for server splash (server name and contact on pause menu) 2024-02-02 04:30:24 -08:00
James R
1bdaa38c7a Replace CopyCaretColors with D_ParseCarets
- New function also sanitizes input
2024-02-02 04:30:24 -08:00
James R
8f2c904651 Sanitize server name and contact fields of non-ASCII characters except color codes
- Strip button codes and other control characters
- Preserve 0x80 - 0x8F color codes
2024-02-02 04:30:24 -08:00
James R
26aed51cd8 SV_ResetServer: clear player ping data
Fixes lag experienced from watching a replay then
affecting the delay icon when starting a server afterward.
2024-02-01 02:35:20 -08:00
James R
2a2149ad60 Use strlcpy for connectedservername/connectedservercontact
Fixes these buffers not being null-terminated at max
length.
2024-01-30 16:39:04 -08:00
James R
6c2736bd1d Move party construction to G_AddPlayer
- Fixes crash when a player leaves when viewing a replay
- Slightly refactors player joining code (including bots)
2024-01-28 23:02:57 -08:00
Oni
ff20f38ffa Merge branch 'in-flight-menus' into 'master'
Course List QOL

See merge request KartKrew/Kart!1867
2024-01-28 23:31:59 +00:00
Sal
3958c15dfe New Credits 2024-01-28 23:31:30 +00:00
toaster
06c049bb7e More consistent lastOn --> itemOn and BGImage setting
Fixes Mari's background image bug
2024-01-27 00:02:16 +00:00
toaster
1d13cb64c0 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into srb2-tidy
# Conflicts:
#	src/p_mobj.c
2024-01-13 22:08:44 +00:00
Oni
ec8be4de63 Merge branch 'help-me-connect' into 'master'
Add help text when failing to connect

Closes #599

See merge request KartKrew/Kart!1832
2024-01-13 00:54:12 +00:00
AJ Martinez
74ab21ecee Add help text when failing to connect for a while 2024-01-12 16:20:12 -07:00
toaster
325079a39a Delete everything major flagged up by listunusedsprites
Notable deletions:
- Metal Sonic Race
    - Includes all the specialised recording/playback apparatus which made g_demo.c harder to read
- A bunch of hyperspecialised code inside several A_ actions
- EXCEPTION: intentfully left in the spriteless SMK stuff for Sal's add-on down the line.
2024-01-11 01:21:43 +00:00
Eidolon
9028668104 Make ticcmd throwdir -1, 0, or 1, add deadzone 2024-01-09 19:13:03 -06:00
toaster
30383ba82f Replace a whole bunch of copypasted boilerplate with direct call to Command_ExitGame_f
Fixes not going back to the Title Screen at the cusp of the game's true beginning.
Also generally cleaner code
2023-12-01 17:03:37 +00:00