Commit graph

1246 commits

Author SHA1 Message Date
Sal
ddaa21384d Merge branch 'monkey-input' into 'master'
Fuzzing cvar

See merge request KartKrew/Kart!1439
2023-09-03 18:43:13 +00: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
Sally Coolatta
e6e7056aae Add bot styles & bot spawn ACS function 2023-06-14 09:16:38 -04:00
Sal
a283f543b4 Merge branch 'more-ui-menumessage' into 'master'
(More UI) M_StartMessage revamp

See merge request KartKrew/Kart!1279
2023-06-14 00:22:09 +00:00
toaster
953abf7d26 CL_CONFIRMCONNECT: Attempt to fix the issue with the Menu Message not sliding
The author of this commit *needs* netgame testing, Rean
2023-06-09 19:31:06 +01:00
toaster
6c6306889a M_StartMessage revamp
Immense 25-file diff, so spun off into its own branch.
- Improved appearance
    - Not just a big block of text on a blue background
    - Well, OK, the main part is, but some stuff has been spun out into its own fields
        - Title text
        - Text and button prompt for Yes/No or OK
    - Slides with pow on and off the screen
- Disabled MM_EVENTHANDLER, which has always been dog but got considerably worse after newmenus to the point nothing's using it anymore
    - Required in order to reduce the reliance on FUNCPTRCAST, which prevents Eidolon from compiling some stuff because it's not valid C++
2023-06-09 19:23:36 +01:00
AJ Martinez
5030225666 Make ping-update packets more frequently 2023-06-07 01:12:43 -07:00
AJ Martinez
c716a27454 Don't trash memory when reading saved PWR 2023-06-01 21:46:54 -07:00
Oni
957453d02f Merge branch 'raise-textcmd-limit-dumb-version' into 'master'
Expand textcmd size byte to 16-bit word, raise MAXTEXTCMD

See merge request KartKrew/Kart!1265
2023-06-02 03:19:44 +00:00
James R
039a73ce64 Expand textcmd size byte to 16-bit word
Raises hard limit from 255 to 65535
2023-06-01 20:03:23 -07:00
AJ Martinez
dd5332df83 Smooth out gentleman delay 2023-05-28 01:31:27 -07:00
James R
20d9d48483 Destroy parties explicitly before building
This removes a call to G_DestroyParty from CL_ClearPlayer.
The problem with calling it from there is that the
consoleplayer of a splitscreen is removed first, the local
party is cleared. Then G_LeaveParty assert fails when the
next splitscreen player is removed because the console's
party was already cleared.
2023-05-18 19:15:02 -07:00
James R
11b2ee0d26 Got_AddBot: build party and set playerconsole
Fixes bot's local party being empty (fails assert at
G_LeaveParty).
2023-05-18 18:40:01 -07:00
AJ Martinez
fdc41848a9 Oops, servernode isn't a player index 2023-05-14 22:20:33 -07:00
AJ Martinez
6184ba60c5 Fix chat messages being krangled on dedicated servers 2023-05-14 21:34:25 -07:00
toaster
de22fc8ff1 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into profile-restrictions
# Conflicts:
#	src/hu_stuff.c
#	src/y_inter.c
2023-05-12 13:42:50 +01:00
AJ Martinez
28bba54905 Allow host to skip gamestochat, not just admins (??????????????) 2023-05-10 00:26:12 -07:00
toaster
ab68be49e1 cv_antigrief
- Increments a timer on human players who aren't making progress, does it even faster if they're going backwards.
    - Only applies in:
        - Netgames
        - GTR_CIRCUIT after the timer starts
        - If there's no timelimit, pointlimit, or K_Cooperative (because unproductive behaviour there will be punished by other rules)
    - The rate at which this changes needs trial and error, but getting the feature functional is more important to start out with.
- If this timer reaches cv_antigrief's value in seconds , the player gets a "Grief Strike"
    - This doesn't happen if:
        - There's only one active player in the server, so FREE PLAY permits mappers to test what increments/decrements the counter
            - Turn `debugwaypoints` on to observe this
        - The cvar is set to 0
    - Less than 3 grief strikes is a forced spectate
    - Anything more is a kick via "automatic grief detection"
        - Unless your node is the host (or an admin)
    - Remove grief strike strike for finishing normally

# Conflicts:
#	src/d_clisrv.h
2023-05-01 16:57:35 +01:00
toaster
9e30ffcdb7 Got_KickCmd: Do not kick players with the server node from the server (this shut down the server previously !?) 2023-05-01 16:57:34 +01:00
AJ Martinez
08ffc79b5c PT_SAY: Review fixup 2023-04-30 19:05:29 -07:00
AJ Martinez
5854969fa9 PT_SAY: Help GUESTs understand what's going on a little better 2023-04-30 05:59:13 -07:00
AJ Martinez
eb8c568723 Index footgun warning 2023-04-29 20:30:53 -07:00