Commit graph

1565 commits

Author SHA1 Message Date
Sally Coolatta
668d832ca1 Delete respawn command, put Ring shooter on Y 2023-04-17 00:23:06 -04:00
lachablock
c98ff9616b Start Ring Shooter respawn: while e-braking, enter the respawn command to spawn a Ring Shooter. Currently purely visual and does not despawn. Steals the player's face for funsies. 2023-04-17 00:22:07 -04:00
AJ Martinez
b3e7eed018 Merge remote-tracking branch 'origin/master' into serverside-pwr 2023-04-14 20:05:25 -07:00
AJ Martinez
f3d062e4e1 Use non-DEVELOP admin promotion in (HOST)TESTERS 2023-04-13 16:19:35 -07:00
toaster
d61d822231 Compilation fixes: Unused variable warnings 2023-04-11 20:02:39 +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
134a5ef9c0 WIP 2023-04-11 19:38:01 +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
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
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
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
a2362c8bae Merge branch 'misc-debug' into 'master'
Misc. debug features

See merge request KartKrew/Kart!1158
2023-04-11 16:11:18 +00:00
Sally Coolatta
198672c845 Fix vote buffer for G_RandMap being broken 2023-04-11 01:19:30 -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
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
James R
05b0ecb5b6 Add angle command, set your angle precisely 2023-04-08 01:19:44 -07:00
James R
5b2d791cf6 Add goto command, teleport to a waypoint 2023-04-08 01:01:17 -07:00
James R
dc18fa745a Overhaul teleport command, let it work in netgames
Old syntax with -x, -y, -z, -ang, -aim parameters is
simply replaced with 3 argument syntax like rteleport.

Before - teleport -x 100 -y 50 -z 25
After  - teleport 100 50 25

The lost angle, aiming and star post features can be added
back in separate commands.
2023-04-08 00:47:34 -07:00
toaster
bbf2fc0b5f Merge branch 'tutorial-access' into 'master'
Tutorial access

See merge request KartKrew/Kart!1102
2023-04-06 17:02:59 +00:00
Sally Coolatta
15f60a1f14 Split thing voting screen to a new file 2023-04-03 20:57:31 -04:00
Eidolon
86dd34d807 Merge branch 'pad-rumble' into 'master'
Gamepad rumble

See merge request KartKrew/Kart!1098
2023-04-03 21:15:34 +00:00
toaster
24d8b20124 GT_TUTORIAL
- Replaces `tutorialmode`.
- Forces gamespeed to Easy, with no POSITION.
    - Laps are currently disabled as well, but this can be changed if necessary.
- Hides Free Play.
- Does not count as a played round (except for Chao Keys).

`tutorialmap` has also been removed. This will be replaced in a later commit with something that plays nicer with Ring Racers' existing systems.
2023-04-03 00:28:37 +01:00
toaster
89fc9a618e Rumble toggle attached to profile
- Will silently merge conflict with !1093, make sure to adjust PROFILEVER handling
- (profile_t *)->rumble
- cv_rumble[MAXSPLITSCREENPLAYERS]
- cv_dummyprofilerumble
- Disables all current rumbles when toggling off
- Prevents new rumbles from being set while turned off
2023-04-02 23:16:58 +01:00
toaster
7a9779d242 Remove a bunch of mouse console variables that hold no relevance to us 2023-04-02 23:09:56 +01:00
AJ Martinez
d84ee59887 Merge branch 'fix-spectator-noclip' into 'master'
Let noclip cheat remove floor/ceiling clipping while in spectator mode

See merge request KartKrew/Kart!1134
2023-04-02 21:20:08 +00:00
Eidolon
c64bdca667 Reset rumble on net pause and pause menu 2023-04-02 21:56:41 +01:00
James R
a0985eb043 Parties: fix invite command letting you invite local splitscreen players 2023-04-02 17:26:33 +01:00
James R
9b5b07b03c Completely rewrite party management code
Replaces g_splitscreen.c with g_party.cpp. Simplifies
party management functions.

Moves externs out of already bloated doomstat.h and
g_game.h into g_party.h.

Cuts down on globals spam.
2023-04-02 17:26:33 +01:00
James R
a3a3f4cd18 Add missing return statements to invite and cancelinvite commands 2023-04-02 17:26:07 +01:00
James R
b1c3d1b2e7 noclip command: toggle MF_NOCLIPHEIGHT in spectator 2023-04-02 05:22:17 -07:00
Sal
3a109dbe78 Merge branch 'uncap-numlaps' into 'master'
Remove restrictions on numlaps, merge with gptest

See merge request KartKrew/Kart!1116
2023-04-01 20:12:47 +00:00
AJ Martinez
495b51f6c2 Merge branch 'licenses' into 'master'
Add LICENSE-3RD-PARTY.txt

See merge request KartKrew/Kart!1110
2023-03-31 03:00:58 +00:00
James R
e437656633 Remove restrictions on numlaps, merge with gptest
- numlaps 0 now sets the race to 0 laps.
  - Players will finish upon crossing the finishing line
    immediately after POSITION.

- gptest merged with numlaps.
  - numlaps works in GP.

- Warping to sprint maps with numlaps already set now lets
  numlaps exceed the map default. It was previous capped
  at map default ONLY when loading into the level (so you
  could still exceed it by setting numlaps during
  POSITION). Now it's consistent.

- numlaps can now be set at any time during the race.
2023-03-29 03:53:21 -07:00
James R
78df6ec488 devmode: add devmode_screen cvar, select which splitscreen to display info for
Old behavior was just use the last splitscreen.

This does not the position devmode draws on the screen.
2023-03-29 00:09:50 -07:00
AJ Martinez
5a52199dc8 Refactor challenge creation, no more duplicated memory shenanigans 2023-03-28 01:25:55 -07:00
AJ Martinez
630555ca51 More bad actor cvars 2023-03-28 01:25:54 -07:00
AJ Martinez
137f166043 Cvars to do bad network things in DEVELOP, fixes to bad network things 2023-03-28 01:25:54 -07:00
AJ Martinez
2925843ea2 Sigfail command for testing, fix guest join sigcheck, scaffolding for sigfail kick reason 2023-03-28 01:20:43 -07:00
AJ Martinez
baedcc6ade Add allowguests cvar 2023-03-28 01:20:43 -07:00
James R
4475823058 Fix networked addfile command erroring twice for already added files 2023-03-26 02:32:44 -07:00