Commit graph

19791 commits

Author SHA1 Message Date
Sally Coolatta
438e639d46 Merge branch 'master' into just-bot-things 2022-08-26 19:16:43 -04:00
Sally Coolatta
4c6109f62d Fix redundant check from the optimization
The drawsegs x range already filters this case out, so this will never be reached.
2022-08-26 17:08:35 -04:00
James R
ad242cf9b9 Makefile: do not append master branch name 2022-08-26 10:46:02 -07:00
Sally Coolatta
d3cbf0cd6f Oops, properly scale for high-res/splitscreen
prboom-plus uses 320 here always, but that's because it handles high resolutions differently apparently.
2022-08-25 00:31:23 -04:00
Sal
7c5d066684 Merge branch 'clip-sprites-optimize' into 'master'
Sprites clipping against drawsegs optimized, from prboom-plus

See merge request KartKrew/Kart!650
2022-08-25 03:33:58 +00:00
Sally Coolatta
66f120c1b2 Merge branch 'master' into clip-sprites-optimize 2022-08-24 22:23:13 -04:00
Sally Coolatta
8494c30e08 Drawseg clipping optimized, from prboom-plus 2022-08-24 22:03:05 -04:00
Sal
66aa976cc2 Merge branch '14-expedited' into 'master'
Expedited 1.4+ fixes

See merge request KartKrew/Kart!649
2022-08-24 23:10:47 +00:00
James R
dc221caa9f Merge branch 'model-offset-fix' into 'master'
Fix offsets for models

See merge request KartKrew/Kart!647
2022-08-24 23:08:47 +00:00
toaster
851a2094cf Don't even attempt to advertise a non-netgame server.
This appears to be a long-time bug that exists upstream too, but nobody even knew about it before the MS rules alert made it clear this was actually happening!

# Conflicts:
#	src/m_menu.c
2022-08-24 23:54:38 +01:00
James R
41fa7fe14e Rename rendezvousserver to holepunchserver
# Conflicts:
#	src/mserv.c
2022-08-24 23:39:54 +01:00
James R
222b1b9422 Master server: use I_OutputMsg during startup
CONS_Printf calls CON_Drawer during startup, thread
collision stuff.
2022-08-24 23:33:34 +01:00
James R
09d48b00f8 Reset remotenode when discarding STUN/hole punch packet
Fixes some wild behavior when a lot of hole punching
requests are coming in.
2022-08-24 23:33:25 +01:00
toaster
1a6e54e673 Fix VHS effect speeding up with interpolation. 2022-08-24 23:33:08 +01:00
toaster
ede34864ac Fix changing gamespeed from the menu, for real
I originally wrote a ridiculous attempt at reimplementing the existing value rollaround. For one reason or another, that sidesteps net transmission. Let's just avoid all those hacks and limit our influence to changing the maximum allowed range.

# Conflicts:
#	src/command.c
2022-08-24 23:30:42 +01:00
toaster
1989ab01c4 Merge branch 'hostcode' of https://git.do.srb2.org/KartKrew/Kart into hostcode
# Conflicts:
#	src/d_clisrv.c
#	src/d_net.c
#	src/d_netcmd.c
#	src/hu_stuff.c
#	src/i_net.h
#	src/i_tcp.c
#	src/k_pwrlv.c
#	src/s_sound.c
2022-08-24 23:00:16 +01:00
toaster
7a7cab67b1 Don't engage in server automation in a restricted context. 2022-08-24 22:38:02 +01:00
toaster
37f8b0e717 NUMSFX > sfxfree for PlaySound 2022-08-24 22:28:02 +01:00
toaster
48a1f7f94d Revert the reversion of 2.2 information.
- Corrects the definition for cv_kicktime.
- Moves its registering to the correct place for being saved to the config.
- Restore LUAh_GameQuit.
2022-08-24 22:24:10 +01:00
toaster
a59e28f339 Catch several ways ban.txt could be malformed by a well-meaning server host, and report it back via the log. 2022-08-24 21:58:53 +01:00
toaster
6e26aff1e3 Free the banned struct on SOCK_ClearBans. 2022-08-24 21:58:38 +01:00
toaster
1667b050b2 Complete BANFORMAT header implementation.
* Warn the user when an incompatible ban.txt is being loaded, and stop early.
* Don't inexplicably assign as a boolean, you bafooligan!
2022-08-24 21:58:25 +01:00
toaster
34cb5192a7 Fix an issue where if the last line of an M_StartMessage was the longest, the box width wouldn't account for it. 2022-08-24 21:58:03 +01:00
toaster
a798c43028 First commit with actual human testing involved.
* Fix some bugs.
    * Reset bannode information properly, fixing being unable to join your own server.
    * Write to the buffer before saving the kick/ban reason, rather than after.
* Improve the print output for the `showbanlist` command.
    * Includes username.
    * Includes remaining time as seen by a kicked joiner.
    * Hides expired bans.
* Improve the messages for ban/kick related refused joins.
    * Replace the Reason with the actual admin-provided reason for refused connection.
    * Replace the "Server refuses connection" header with "You have been [banned/temporarily kicked] from the server", the previous given Reason.
    * Fudge the time reported for temporary kicks so that a user is encouraged to return slightly after their tempkick ends, rather than before.
* Add an extra newline to the M_StartMessage for being kicked/banned with a reason provided.

# Conflicts:
#	src/d_clisrv.c
2022-08-24 21:56:48 +01:00
toaster
f728f164f5 Create a single struct for bannednode and bannednodetimelft, and use the matching ban ID inside that struct.
While this commit does not increase the visibility of ban reasons, it makes this possible later.
2022-08-24 21:53:49 +01:00
toaster
e4e2550592 Enforce MAX_REASONLENGTH when reading ban.txt. 2022-08-24 21:53:18 +01:00
toaster
4ad6220f3e Core 1.4 specific changes.
* Ensure it can compile.
    * Removing vanilla 2.2 properties that slipped in to previous commits.
    * Rearranging i_tcp.c to avoid implicit declaration.
    * Complete rename of `IsNameGood` to `EnsurePlayerNameIsGood`.
* Add "BANFORMAT" header, for versioning support.
* Add conversion from 1.3-and-earlier format to new system.
* Don't ban the entire internet - convert zero-masks to the most specific ones.

# Conflicts:
#	src/d_netcmd.c
#	src/i_tcp.c
2022-08-24 21:52:49 +01:00
James R
a477182ea7 Draw PINGD before delay number 2022-08-24 21:43:21 +01:00
James R
795aa4b73f Ping counter: change patch name PINGF to PINGD
# Conflicts:
#	src/config.h.in
#	src/hu_stuff.c
2022-08-24 21:43:04 +01:00
James R
2ec2873b3e Fix compiler warnings 2022-08-24 21:07:42 +01:00
Sally Coolatta
281004bb85 date-time todo comment 2022-08-24 21:07:42 +01:00
Sally Coolatta
d6e2410cbb Ban improvements
- Save a note of the username, not just the reason.
- Allow setting a mask with the `banip` command.
- Make ban.txt's formatting a lot more sane. Username and reason are stored in quotes. The mask uses the same formatting as actual CDIR.
- Keep track of if we tried to load ban.txt. If it wasn't, then don't save over it with a blank file.
- Disallow quotes in player names, as it makes player name detection in console more annoying, and saving username in files scary.
2022-08-24 21:07:42 +01:00
Sally Coolatta
eb7e84b961 Automate commands
- `automate_set <event name> <command>` to set a command to run each time an event triggers.
- Currently implemented events are "roundstart", "intermissionstart", and "votestart", all of the ones from HOSTMOD.
- Turn `automate` off to disable this feature entirely. Because of the new safer way this is implemented (in HOSTMOD, this just calls some console aliases), this is turned on by default instead of off.
- This is set up in a way to facilitate adding more automation events very easily, if desired.
2022-08-24 21:07:41 +01:00
Sally Coolatta
0308ab6bd4 Scheduling commands
- `schedule_add <seconds> <command>` to add a command that runs on a recurring timer.
- `schedule_list` to print out all of the scheduled tasks.
- NEW: `schedule_clear` to revert the schedule to a blank slate.
- `schedule` cvar determines whenever or not to run the scheduled tasks. Unlike HOSTMOD, turning this off will reset the timers of the tasks, instead of freezing them.
- I did not implement HOSTMOD's ability to pick from several random command per scheduled task. Would drastically increase the code complexity when you can just use a choose command in your schedule_add for the exact same effect.
2022-08-24 21:07:41 +01:00
Sally Coolatta
d2a0bdb044 Attempt fix for players being able to get admin
Tyron said there is an "outstanding base game bug where an authenticated player can ghost and a new player will log in on their node, inheriting admin" ... wow that's terrifying! Let's reset admin for every  instance of CL_ClearPlayer instead of only in CL_RemovePlayer.
2022-08-24 21:02:39 +01:00
Sally Coolatta
2fdd8c1e13 Implement shout commands
- shout command to create a server message, with its own special sound cue & color
- shoutname to control the nametag, by default this is "SERVER"
- shoutcolor controls the color of the message. By default it's red, but there's also a option for player colored.
- autoshout makes any message sent by a admin/server automatically turn into a shout
- Unlike HOSTMOD shout, integrated it with the dedicated server say behavior -- using say on dedicated server is always a shout.
2022-08-24 21:02:39 +01:00
Sally Coolatta
3096806f04 Kicks are now temp bans
Length is determined by the "kicktime" cvar, in minutes. By default, this is set to 10, but I'm willing to adjust this. Only applies to manual kicks (in the future, maybe also name filter kicks).

The timestamp for the unban time is even saved in ban.txt, so long-term temporary bans are completely possible. (I checked, you can attempt to ban someone for up to 1902 years if you really want to.)
2022-08-24 21:02:38 +01:00
Sally Coolatta
5ea0f69a83 - Attach ban reasons to banned_t
- Properly call D_SaveBan after remote bans. Bans are no longer saved in the ban command and instead wait for the actual kick to process, since before they were split between the two, which is what caused the discrepancy.
2022-08-24 21:02:38 +01:00
Sally Coolatta
2c604e2487 Combine banned & bannedmask into banned_t
Better code cleanliness, also makes it easier to add more data to bans later (such as a timestamp for temporary bans)
2022-08-24 21:02:38 +01:00
Sally Coolatta
e9ae1e3944 Start banned_size much smaller 2022-08-24 21:02:38 +01:00
Sally Coolatta
35b82b6dd9 Random choice commands 2022-08-24 21:02:38 +01:00
Sally Coolatta
118eb0b3dd Remove MAXBANS
Needs proper stress testing but seems to work.
2022-08-24 21:02:37 +01:00
Sally Coolatta
f571e559d4 Playsound command
For scripted global sound cues for the entire server.
2022-08-24 21:02:37 +01:00
Sally Coolatta
70c48fc0e9 Ping measured in frame delay instead of milliseconds
The part of HOSTMOD ministats that I wanted. Can go back to ms using the pingmeasurement cvar.

If Tyron wants to bring ministats fully in I think it'd be better to bring its ideas to replace the current HUD instead, ideally using the existing ping gfx, so they should bring it up with Oni
2022-08-24 21:02:37 +01:00
Sally Coolatta
113dd6a600 Map helper commands from HOSTMOD 2022-08-24 21:02:36 +01:00
Sal
57a3aef590 Merge branch 'egg-fast-drift' into 'master'
Give heavy-accel a bonus to drift boosts

See merge request KartKrew/Kart!648
2022-08-24 07:34:34 +00:00
Sally Coolatta
7f4b3e7c2a maybe fix lightning crash idk lol 2022-08-24 03:34:03 -04:00
Sally Coolatta
a4767323f2 Give heavy-accel a bonus to drift boosts 2022-08-24 01:38:50 -04:00
Sally Coolatta
0a7b437328 Fix offsets for models 2022-08-24 00:46:12 -04:00
Sally Coolatta
429f61966e Merge branch 'master' into item-bungus 2022-08-23 23:42:21 -04:00