Commit graph

1266 commits

Author SHA1 Message Date
toaster
ccbcd203dd Adjust PlayerPointerRemove macros + associated to check validity before removal 2023-11-06 01:11:29 +00:00
Oni
3b04bde5b9 Merge branch 'will-it-blend' into 'master'
Will It Blend

See merge request KartKrew/Kart!1589
2023-11-05 18:45:51 +00:00
AJ Martinez
78086fc625 Fix duplicate pubkey detection misfiring on retry 2023-11-04 18:20:26 -07:00
toaster
bd5fdb3b82 PR_INTERPHUDRANDOM
Fixes several things to do with the boss healthbar.
- Makes its randomised jitter work with interp/pause
- Constantly calling the external PRNG tanks performance, at least on Windows, so this solves that too

Done as a special non-netsynced random class so the author of this commit wouldn't have to create a third suite of duplicated Random functions.
2023-10-25 12:55:44 +01:00
Oni
b36d93c74d Merge branch 'network-debug' into 'master'
Packet loss indicator

See merge request KartKrew/Kart!1573
2023-10-24 01:26:20 +00:00
AJ Martinez
15338c4e32 Packet loss indicator 2023-10-20 20:33:37 -07:00
toaster
0478d9a2e3 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into break-through-them-all 2023-10-19 17:32:35 +01:00
James R.
9847acc49c Merge branch 'robust-sigcheck' into 'master'
Don't skip signature check steps if server is lagging (resolves #715)

Closes #715

See merge request KartKrew/Kart!1554
2023-10-18 01:02:47 +00:00
toaster
acad8754c8 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into break-through-them-all 2023-10-17 23:32:08 +01:00
AJ Martinez
f9f5c74244 New bans 2023-10-16 23:50:50 +00:00
AJ Martinez
3c84d82d7f Robust sigchecks: actually stage the entire diff 2023-10-15 14:51:06 -07:00
toaster
6533e7e69f Consistancy(void): Use TypeIsNetSynced instead of MT_OVERLAY-specific check
In addition, don't use frame - I'm pretty sure this was something we've already violated to no ill effect.
2023-10-06 22:18:08 +01:00
toaster
8bb41b787b Fix SECRET_SKIN locks preventing Rivals from showing up
Previously, there was a permanent exception for Eggrobo (the default bot skin).
Now that exception is generalised for the specific skin the bot is being assigned, which we assume is intentful and correct.

In addition, the randomclass PR_BOTS now controls K_RetireBots as well, matching the other two random calls done for bot skins.
2023-10-05 18:12:32 +01:00
toaster
f522cae573 SV_GenContext: Guard #ifndef TESTERS
Fixes compiling TESTERS builds
2023-09-26 23:16:49 +01:00
Oni
86ff4f720b Merge branch 'bot-finally' into 'master'
Fix bot memory leak

See merge request KartKrew/Kart!1474
2023-09-10 23:52:08 +00:00
Sally Coolatta
bfecf45110 Use srb2::finally on bot predictions
I'm not sure exactly where the bot code leaks, other than knowing its the prediction for sure (because the prediction is the only memory bots ever allocate), but srb2::finally is cool and lets me not care :)
2023-09-10 03:20:29 -04:00
toaster
69e73b1932 Fix screenshot/video recording for CL_ServerConnectionTicker inner loop 2023-09-08 23:31:22 +01:00
Sal
eff847b216 Merge branch 'connecting-conundrums' into 'master'
Connecting Conundrums

See merge request KartKrew/Kart!1453
2023-09-08 02:05:09 +00:00
Sal
ddaa21384d Merge branch 'monkey-input' into 'master'
Fuzzing cvar

See merge request KartKrew/Kart!1439
2023-09-03 18:43:13 +00:00
toaster
8300a438d2 Command_connect: Clean up + improved error message for attempting to use during the server join process (which includes Server Browser) 2023-09-02 17:06:17 +01:00
toaster
124e69be60 SL_InsertServer: Behaviour repair for multiple contexts
- Repair connecting to a modded server via direct IP/address
    - Done by leveraging serverlistultimatecount
    - !server was good for avoiding dinging modded local games, but there was other behaviour broken.
- Don't underflow serverlistultimatecount on rejection of undesired serverinfo
2023-09-02 17:01:23 +01:00
AJ Martinez
030d3d0656 Merge branch 'monkey-input' of git.do.srb2.org:KartKrew/Kart into monkey-input 2023-09-01 16:58:41 -07:00
AJ Martinez
3031dccfa2 Net fuzzing 2023-09-01 16:58:30 -07:00
Eidolon
428fa11231 Merge branch 'rhi-remove-passes' into 'master'
hwr2: Remove pass infrastructure

See merge request KartKrew/Kart!1440
2023-09-01 23:17:54 +00:00
Eidolon
7c91cd56be Ignore the room type of local servers
This fixes an infinite loop where the local server is filtered out of
the server list when "joining" a local match with files added.
2023-09-01 18:10:18 -05:00
toaster
1d3a7c717e Merge branch 'let-release-build' into 'master'
Various fixes to let release builds compile

See merge request KartKrew/Kart!1448
2023-09-01 20:45:54 +00:00
Eidolon
6f580606cd hwr2: Remove pass infrastructure
It's not worth trying to force the engine to conform to deferred
drawing.
2023-09-01 15:30:04 -05:00
James R
95ae37fa0a Various fixes to let release builds compile
- Fixed followers.pk3 asset hash checking.
- Moved asset hashes from config.h to d_main.c directly.
  - Changes to config.h.in require building the game twice
    and having it in d_main.c is just more contained.
- Removed old reset on holepunchserver if it was set to
  the wrong address. This was only relevant for a short
  period of time during development.
- Fixed cv_kartencoremap being used outside of DEVELOP.
- Fixed unused variable warning in GotOurIP.
2023-08-31 18:15:52 -07:00
toaster
afb7328aa4 SV_SpawnServer: Register netgame-advertised servers with the MS
This is done in a different location in the previous entry in the series, but the author of this commit couldn't find it.
Since we're using the 2.2 codebase, it's been put where they have it instead.
2023-08-31 20:00:34 +01:00
toaster
acca45d611 SL_InsertServer: If we have cause to reject a server, remove it from the serverlistultimatecount immediately rather than waiting for it to time out 2023-08-31 20:00:34 +01:00
toaster
7fd64a4c3d Get the Server Browser working again
- KartKrew/Kart-Public!313 has finally been integrated with the changed menu code
    - Attempts multiple times to get every public server, up to nettimeout
    - Clear the server list when entering/exiting and refrehing
    - Show visible servers and potential servers opposite the Refresh input
    - I would have done this in another commit, but the system was too broken to repair without just putting the working solution in wholesale
- Improved visual scrolling behaviour
- Pressing A actually joins the server
- CORE vs MODDED is handled in SL_InsertServer, not a seperate function to drop/memcpy things around

Also, abstract out the little "PLEASE WAIT..." message popup during potential IO block into M_PleaseWait (only used on connect process via Menu)
2023-08-31 20:00:33 +01:00
toaster
e123ed7480 MAJOR cleanup of Spectator set/unset
- G_AddPlayer now contains CL_ClearPlayer, G_DestroyParty, and playeringame set
- Instead of a nasty, complicated block in P_SpawnPlayer, externalise it into G_SpectatePlayerOnJoin
- All mid-game human player-to-spectator transitions are handled by P_SetPlayerSpectator, instead of lots of `spectator = true` and associated boilerplate
    - Simplifies Got_Teamchange MASSIVELY
        - Of course this is helped by also stripping back team change
    - This is called by P_KillPlayer, too
- P_KillPlayer no longer eats DMG_SPECTATOR when lightsnaking or exiting
- G_GametypeHasSpectators condition tidied
2023-08-26 19:48:20 +01:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
2023-08-25 17:22:40 -07:00
Sally Coolatta
2a68650477 Clear name/contact with strncpy instead of memset
Probably doesn't matter, but it satisfies my OCD better
2023-08-25 15:08:53 -04:00
Sally Coolatta
019546e846 Add server join splash
Just wanted to give literally any possibility of seeing the server contact as a client
2023-08-25 14:42:01 -04:00
James R
7b9665402a P_ForceLocalAngle: reset ticcmd angles and localsteering
For Sealed Stars, restarting the level after turning away
from the spawn angle. This would slightly skew your
momentum when spawning.
2023-08-19 17:03:32 -07:00
James R
fec0f13419 P_DemoCameraMovement: use locally built ticcmd from G_BuildTiccmd 2023-08-19 05:01:40 -07:00
James R
c6254d29f9 Don't restart netgame connection music if it's already playing 2023-08-08 17:39:35 -07:00
James R
39f46a0f20 Replace music handling
(This commit does not compile. Sound test and tunes
command code needs to be ported after this.)

This is a big one. Here's the rundown:

The old music system was very direct, much of the time
just a proxy to the real sound API in i_sound.h.

You could change the music on command, but there wasn't
a consistent way to prevent some music from playing over
others. P_RestoreMusic is one example of needing to
address this problem. The jingles system was intended as
another solution. Furthermore, sound test (Stereo) has its
own needs.

I am removing all of that. Music handling in general is
now a very deliberate system, kind of similar to jingles.

In the new system, "tunes" are registered. The tune stores
info such as whether it should loop or fade out. Most of
the configuration is intended to be initialized only ONCE.
Tunes can be mapped to an actual music lump. They can be
remapped at any time too.

Tunes are also configured with a priority number. This
determines which tune is heard, if multiple are supposed
to be playing at a time. You can even tell a tune how long
it should play, so it's unnecessary to track this with
bespoke timers.
2023-08-06 17:31:45 -07:00
Oni
0b5cae201e Merge branch 'dont-rewrite-the-past' into 'master'
Don't rewrite the past if we might still need to send it

See merge request KartKrew/Kart!1333
2023-07-24 23:12:41 +00:00
toaster
2dbb11af89 Use S_AttemptToRestoreMusic to handle music after server connection
Resolves #473
2023-07-22 19:24:25 +01:00
James R
6f4d014ebb Merge branch 'get-ourip-once' into 'master'
Fetch the server IP once

See merge request KartKrew/Kart!1337
2023-07-19 21:39:47 +00:00
toaster
ce08ac0f33 General tidy of mobj_t pointers on player_t struct
- CL_ClearPlayer
    - Delete followmobj, stumbleIndicator, and sliptideZipIndicator
    - Wipe flickyAttacker and powerup.flickyController
- G_PlayerReborn
    - Properly destroy the Follower and its bubble overlays, etc
    - Ensure ringShooter pointer is kept
    - Delete followmobj, stumbleIndicator, and sliptideZipIndicator
    - Wipe flickyAttacker and powerup.flickyController
- P_PlayerThink
    - Ensure all invalid pointers are erased, even on hitlag frames
2023-07-18 15:50:39 +01:00
SteelT
3d6d2694b3 Fetch the server IP once
Fixes ourIP being set on every map change
Also catches a possible case where joining clients can sigfail in the window between map change and stun response
2023-07-16 19:13:20 -04:00
AJ Martinez
599c87f627 Don't rewrite the past if we might still need to send it 2023-07-16 01:18:23 -07:00
AJ Martinez
fe122291bc Buffer double-submitted ticcmds 2023-07-06 01:37:05 -07:00
toaster
34563ebecd Got_KickCmd: Only PROMOTE any regular kick to votekick if that player's the victim, don't downgrade a ban 2023-06-27 17:30:43 +01:00
toaster
6b1fadd9d2 Make the Server Connection Ticker use the MenuCMD system
- Permits the use of the existing K_HandleMenuMessage MM_YESNO system, instead of the faked previous implementation
    - Removes the "cl_requestmode" hack
    - The only area of the game that fakes handling Menu Messages is the title screen, now, due to the lack of guarantees for menu inputs.
- *Also* permits Screenshots and video/lossless Recordings to be started/ended on this menu.
2023-06-25 23:44:38 +01:00
toaster
d450faeaaf General Menu Message input cleanup
- M_StopMessage is now in charge of setting the answer to a given prompt.
- Menu Messages can now be dismissed on the title screen, instead of carried into the top-level menu transition.
2023-06-25 23:44:38 +01:00
Sally Coolatta
54e6efc798 K_AddBot is direct
No longer sends a packet from the server, now all clients do it. Old method is kept just in case.
2023-06-15 12:06:21 -04:00