Commit graph

1533 commits

Author SHA1 Message Date
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
toaster
9aeebe44e9 queuemap: Add "-clear" parameter
- Can be used to clear all entries in the round queue
- Stores the special state in the gametype field
- Returns a message if the queue is already empty
2023-05-03 23:46:09 +01:00
toaster
80ed8b81b9 Command_Map_f, Command_QueueMap_f: Prevent memory leak on cheat-limited early-return 2023-05-03 23:23:45 +01:00
toaster
b72bc73d28 Two new command automation events
- "QueueStart"
    - Activates just before RoundStart, but only if a roundqueue is being started
- "QueueEnd"
    - Activates just before IntermissionStart, but only if the roundqueue has just finished its final map
I chose before in both instances because Automate_Run runs off COM_BufAddText, and I don't completely trust that the buffer won't overflow for particularly complicated server commands, so prioritising the rarer event. However, this is open for discussion
2023-05-03 22:08:13 +01:00
toaster
d09cfe6704 antigrief_cons_t: Increase maximum for parity with the previous entry in the series 2023-05-01 16:57:35 +01: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
15b0141700 Spectator re-entry timer
- On becoming a spectator in a netgame, there is a delay before you can de-spectate.
    - 30 seconds by default.
        - This can be changed using the cvar `spectatorreentry`.
    - ...unless there's only two people left including you, in which case it's three minutes!!
        - This can be changed using the cvar `duelspectatorreentry`.
        - If spectatorreentry is set to greater than duelspectatorrentry, the former is used instead.
    - This timer is wiped on mapload and intermission, so NEW CHALLENGER APPROACHING !! and level changes in general allow people in.
- General purpose cleanup of K_CheckSpectateStatus
2023-05-01 16:57:34 +01:00
toaster
d50e3a1895 Got_Teamchange: Do not repeatedly declare a player has become a spectator if they already were 2023-05-01 16:57:34 +01:00
AJ Martinez
167f5f40ed PT_SAY and gamestochat: the rest of the owl 2023-04-29 20:16:20 -07:00
AJ Martinez
07eb7dea19 Revert "WIP: XD_REQSAY"
This reverts commit 00e25ee593.
2023-04-28 17:14:32 -07:00
AJ Martinez
00e25ee593 WIP: XD_REQSAY 2023-04-28 02:10:50 -07:00
toaster
a03c31f59a SendNameAndColor: Some cleanup
- Default to "Default", not "Match", when sendFollowerColor is unusable
- Do not use invalid index into `followers[]` when adjusting sendFollowerColor
2023-04-25 14:53:25 +01:00
Sally Coolatta
c486ec19af SECRET_COLOR 2023-04-25 14:19:52 +01:00
James R
94e3a6450b Add respawnat command, lightsnake to a specific waypoint 2023-04-24 15:04:14 -07:00
Sally Coolatta
996ca9adad Z Voting 2023-04-20 15:55:38 -04:00
toaster
9c17ea0d28 Got_MapQueuecmd: Fix message handling
- Used Admin status of sender rather than local player to obstruct or hide
- Servers are not admins, they just sidestep many authoriative checks
- Server returned early before any chance of printing
- Slightly cleaner message
2023-04-18 12:32:58 +01:00
toaster
9b0c82d5dc Got_MapQueuecmd: Add a success message for adding a map to the round queue (visible only to admins) 2023-04-17 20:16:30 +01:00
toaster
2d46112c58 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into round-queue
# Conflicts:
#	src/d_netcmd.h
2023-04-17 20:08:37 +01:00
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