Commit graph

22859 commits

Author SHA1 Message Date
AJ Martinez
4f569641fc Store total wins in profiles 2023-04-11 19:38:02 +01:00
AJ Martinez
c7c9f145ca Really get rid of XD_POWERLEVEL 2023-04-11 19:38:02 +01:00
AJ Martinez
3012839138 Serverside PWR: Completely rip out profile PWR, add PWR to XD_ADDPLAYER 2023-04-11 19:38:02 +01:00
AJ Martinez
10fb496689 Version field for srvstats.dat 2023-04-11 19:38:01 +01:00
AJ Martinez
7eb5755963 Disallow duplicate non-GUEST pubkeys 2023-04-11 19:38:01 +01:00
AJ Martinez
d89d06be31 Instantly update stats when players leave 2023-04-11 19:38:01 +01:00
AJ Martinez
134a5ef9c0 WIP 2023-04-11 19:38:01 +01:00
toaster
c7e510a3ec k_collide.cpp: Guard against dereferencing possibly invalid t2 2023-04-11 17:41:41 +01:00
toaster
b9133530e2 Obj_OrbinautJawzCollide: Guard for removed objects 2023-04-11 17:39:53 +01:00
toaster
d4de130fe0 More sanity checks for skipping restricted queue entries
- GTR_FORBIDMP in netgames
- mapheader doesn't exist
2023-04-11 17:18:30 +01:00
toaster
f1ca263c40 Promote gametypes in XD_MAP, XD_MAPQUEUE and XD_REQMAPQUEUE to UINT16
Since new-voting repermitted custom gametypes to go beyond the bounds of a UINT8, here's some extra anti-footgun protection.
2023-04-11 17:18:30 +01:00
toaster
4f271aec24 Handle_MapQueueSend
All XD_MAPQUEUE/XD_REQMAPQUEUE packets are now handled in one function, to guarantee requests are made consistently.
2023-04-11 17:18:30 +01:00
toaster
47ecc6370b K_UsingPowerLevels: Clean up significantly
- Comment each restriction/enablement
- Fix the roundqueue PWR disabling to only occour when the roundqueue is in action, as opposed to when it has any entries at all
2023-04-11 17:18:29 +01:00
toaster
7d1e1a578e (Will merge conflict with new intermission) Do not show advancemap string if roundqueue (or nextmapoverride) will have effect next round 2023-04-11 17:18:29 +01:00
toaster
6bca2a7003 Console command queuemap
- Full valid format: queuemap [name/num] -gametype [name] -encore -force
- Server is fully authoriative about the order of maps in the round-queue
    - Server sends XD_MAPQUEUE (which contains gametype, encore, and ordering)
    - Admin clients have to send XD_REQMAPQUEUE (which contains gametype, encore, and mapnum)
        - Servers spit out a processed XD_MAPQUEUE on reciept
    - Done this way just in case an XD_MAPQUEUE is not recieved and has to be resent, guarantees ordering
- Will create a UI for this post-launch, this is primarily for testing but may be useful for user-ran tournaments
2023-04-11 17:18:29 +01:00
toaster
a1065d9036 G_MapIntoRoundQueue: Seperate into a general append function *and* a specific placement function. A surprise tool that will help us later 2023-04-11 17:18:29 +01:00
toaster
371c52d457 XD_MAP: Clean up associated functions and typings
- Free `mapname` at successful completion of Command_Map_f
- Maps are UINT16, not INT16 or INT32
- Remove [MAP]code component of help message as it hasn't been relevant since long map markers
2023-04-11 17:18:29 +01:00
toaster
85897190e0 GetGametypeParm
Both Command_Mapf and Command_RandomMap take gametype information, so let's seperate it into one generic function
2023-04-11 17:18:29 +01:00
toaster
b8c858e00b Don't halt the server over malformed roundqueue data 2023-04-11 17:18:28 +01:00
toaster
48665e5ee3 [pink dog voice] THAT'S not archive block Parties!! 2023-04-11 17:18:28 +01:00
toaster
487ec6db74 K_UsingPowerLevels: Disable PWR if a roundqueue is in action 2023-04-11 17:18:28 +01:00
toaster
5751ecdcd1 Special stage access-related fixes
- Fix GPEVENT_SPECIAL forcing via rank restriction in round queue
- Re-implements gamedata->everseenspecial
2023-04-11 17:18:28 +01:00
toaster
a08683e819 Improved round-queue state net communication
- Only send from the server when an update to roundqueue state is relevant
- Perform sanity checking on reciept
- Initialise when map command is sent with roundqueue size greater than the client's
- Correct gametype/encore state on reciept
- Only permit from the server, forbid admin clients from providing it on penalty of kick
2023-04-11 17:18:28 +01:00
toaster
19ef96351a roundqueue
A general purpose system that permits cacheing of GP progression in one place, but which permits future expansion and brings Online GP a little closer to reality.
- Stores a bunch of levels, gametypes, encore state, and restricted-by-rank-ness in sequence.
    - Initialised on GP cup select.
    - FUTURE WORK: Open to being initialised by other methods
- Digests its way through that sequence as maps are completed.
- Stores round number instead of `grandprixinfo`.
- Map commands as sent over the wire have been adjusted.
    - Sends round number and size of/position in roundqueue.
    - Now figures out GP Event Type from gametype.
        - Can be swung in the direction of a Special Stage with a hint flag.
        - This hint flag replaces "fromlevelselect", which was functionally vestigal.
2023-04-11 17:18:27 +01:00
toaster
06763da0e7 Merge branch 'bind-function-keys' into 'master'
Remove hardcoded Function keys for screenshot etc, add RECORD LOSSLESS to the profile controls

Closes #284

See merge request KartKrew/Kart!1093
2023-04-11 16:16:23 +00:00
toaster
a2362c8bae Merge branch 'misc-debug' into 'master'
Misc. debug features

See merge request KartKrew/Kart!1158
2023-04-11 16:11:18 +00:00
AJ Martinez
b4ffc33fcb Sliptide-aware camera steering, fix countersteer easing 2023-04-11 00:15:44 -07:00
Oni
e02af33813 Merge branch 'new-voting-actual' into 'master'
Chengi & Oni's voting screen

See merge request KartKrew/Kart!1142
2023-04-11 06:34:40 +00:00
AJ Martinez
94cf9fc47b WIP: don't oversteer when crossing 0 boundary 2023-04-10 23:15:23 -07:00
AJ Martinez
44b642ffa3 WIP: improved countersteering 2023-04-10 22:39:17 -07:00
Sally Coolatta
198672c845 Fix vote buffer for G_RandMap being broken 2023-04-11 01:19:30 -04:00
Sally Coolatta
16df36b65b Draw fill instead of BG for Ivo until RHI bug fix 2023-04-10 23:52:37 -04:00
Sally Coolatta
9de36ce2a9 Slide out votes when you're done voting 2023-04-10 23:14:25 -04:00
Sally Coolatta
d2960ce93d Don't allow resending vote if you have delay 2023-04-10 23:12:08 -04:00
Sal
660d2f6454 Merge branch 'acs-extern-barriers' into 'master'
Fix ACS extern barriers

See merge request KartKrew/Kart!1159
2023-04-11 00:59:34 +00:00
Eidolon
01cc68a9b5 Fix ACS extern barriers 2023-04-10 19:57:56 -05:00
Sally Coolatta
31728166ca Adjust map anger conditions
Don't reset map anger when it votes for itself -- wait until the map gets played or it gets a genuine vote from someone.
2023-04-10 02:27:48 -04:00
Sally Coolatta
9c4ace6fbc Map anger
- Maps build anger every time a map isn't selected by anyone.
- If a map is ignored for 4 votes in a row, then on the 5th vote it shows up it will be angry enough to vote for itself when everyone else finishes voting.
- Once it gives its funny vote, or it gets played, it will calm down again.
- 13P+ vote icons are implemented; it's just a basic circle though cuz lazy.
- Made the roulette finish even faster.
- Bots can vote again but now behind a debug cvar.
2023-04-10 02:10:06 -04:00
Sally Coolatta
95540888ce Handle timed out votes properly again
Instead of picking random, we ask the client for what their cursor is on. If it takes too long to arrive, then we ignore their vote.

Also: fixed a crash if the nextmap was never set during voting (can happen via many 0-players fallbacks, and especially now that it needs to check for client responses on a time out), by always initializing to the first map in the vote.
2023-04-10 02:10:05 -04:00
Sally Coolatta
505595b5d8 Fix ruby scale & position on vote screen 2023-04-10 02:10:04 -04:00
Sally Coolatta
2d8905c816 Handle Encore ruby in Y_DrawVoteThumbnail 2023-04-10 02:10:04 -04:00
Sally Coolatta
11eadd4e75 Add player icon to BG votes 2023-04-10 02:10:03 -04:00
Sally Coolatta
63fdd48b8f Implement BG catchers 2023-04-10 02:10:03 -04:00
Sally Coolatta
81871bc73b Rewrite random map buffer
Each map now just has a countdown for when they'll reappear (stored in mapheader), which gets decremented each time a new map is played. This means it's now compatible across gametype switches, is a lot less complex, and is easy to retrieve the value for a specific map without needing to iterate constantly.

Lots of the old unused code surrounding this function was also removed. Lastly, added a PARANOIA check for callAgainSoon being mishandled.
2023-04-10 02:10:03 -04:00
Sally Coolatta
b799862ccb Implement FG catchers
- Catcher comes down to grab your selection. (Needs per-player arrows, as discussed last night.)
- Catcher has more accurate rainbow cycle. Just looks a bit cleaner.
- Vote thumbnails now have outlines & dims, instead of transparency.
- Put voting roulette code into its own struct.
- Sped up voting roulette. (although it's not visible currently)
- Made modify vote stricter (kick hacked clients trying to do funky stuff)
- Added VOTE_TIME_WAIT_FOR_VOTE define. If enabled, voting timer will only start when any player gives a vote. Currently disable because it'd be exploitable without mid-game vote joining.
2023-04-10 02:10:01 -04:00
Sally Coolatta
7641c6a276 ModifyClientVote sends a netxcmd for the player
It was implemented before SendNetXCmdForPlayer, so it used to just send it from the consoleplayer and just attach the player number separately. Now the packet will actually be guaranteed to come from the player that wants to change their vote. (Probably was fuckin possible to just change everyone else's votes with a hacked client before, right)
2023-04-10 02:10:00 -04:00
Sally Coolatta
8432d7e552 Big vote screen cleanup
- 4th map is now a regular option instead of dice.
- Add function to draw a maintained Combi Catcher object on screen.
- Put all vote static variables into either a "vote" struct or a "vote_draw" struct, if it's logic or drawing code.
- Prefix netcode vote globals with _g.
- Add enums/defines for vote magic numbers.
2023-04-10 02:09:59 -04:00
Sally Coolatta
f1ec39764f New voting screen background 2023-04-10 02:09:59 -04:00
James R
d2ab07c10e Merge branch 'r-segs-cpp' into 'master'
r_segs.c C++ conversion + cleanup

See merge request KartKrew/Kart!1151
2023-04-09 08:17:52 +00:00
Oni
d6d8cf548a Merge branch 'optimize-precip-think' into 'master'
Optimize precipitation by eliminating the thinker entirely

See merge request KartKrew/Kart!1157
2023-04-09 05:31:31 +00:00