Commit graph

7395 commits

Author SHA1 Message Date
Sal
cf4bb3bbe0 Merge branch 'musicchange-fix' into 'next'
Fix MusicChange lua hook returning some values incorrectly

See merge request KartKrew/Kart-Public!287
2022-07-04 09:17:53 +00:00
toaster
36e44f2f6f Free the banned struct on SOCK_ClearBans. 2022-07-03 22:01:51 +01:00
SteelT
baf7620e61 Fix MusicChange lua hook returning some values incorrectly 2022-07-03 15:51:51 -04:00
James R
a95907cb8c Print and display rules from the master server
Update HMS version to 2.2.

Fetch the rules when master server cvar set. Print rules
in console when server register. Display the rules in the
menu when entering the server hosting menu or when
changing the advertise cvar.
2022-07-02 22:49:25 -07:00
toaster
7c92a7efbb 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-06-15 22:34:05 +01:00
toaster
3ff5e3f8cd Fix an issue where if the last line of an M_StartMessage was the longest, the box width wouldn't account for it. 2022-06-15 17:00:09 +01:00
toaster
3498f1cff1 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.
2022-06-15 16:56:38 +01:00
toaster
40f7be7676 Static for compilation warning. 2022-06-15 13:36:32 +01:00
toaster
7bc59abc30 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-06-14 22:09:27 +01:00
toaster
cd6b1b2cd9 Enforce MAX_REASONLENGTH when reading ban.txt. 2022-06-14 21:42:41 +01:00
toaster
8addea0d45 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.
2022-06-14 21:15:35 +01:00
toaster
55be74396f 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.

# Conflicts:
#	src/d_clisrv.c
#	src/d_netcmd.c
#	src/i_tcp.c
2022-06-14 17:25:40 +01:00
toaster
8d05bf669b 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.)

# Conflicts:
#	src/d_clisrv.c
#	src/d_clisrv.h
#	src/i_tcp.c
2022-06-14 17:15:28 +01:00
toaster
24181ae738 - 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.

# Conflicts:
#	src/d_clisrv.c
#	src/i_tcp.c
2022-06-14 16:58:07 +01:00
toaster
2f0e1521d0 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)

# Conflicts:
#	src/i_tcp.c
2022-06-14 16:48:29 +01:00
toaster
77e67d86bc Remove MAXBANS
Needs proper stress testing but seems to work.

# Conflicts:
#	src/i_tcp.c
2022-06-14 16:46:12 +01:00
toaster
8b7aab97c6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public.git into next 2022-06-14 16:38:37 +01:00
toaster
9d568673f1 Merge branch 'turn-dampen-cap' into 'next'
Cap on turn dampening

See merge request KartKrew/Kart-Public!284
2022-06-14 15:35:36 +00:00
toaster
d49bd1474a Merge branch 'jug_nobumpcode' into 'next'
Fix bumpcode, fix magnet landing (better fix)

See merge request KartKrew/Kart-Public!281
2022-06-14 15:34:39 +00:00
Sally Coolatta
c3ce70299f Store K_GetKartSpeed result 2022-06-02 22:10:05 -04:00
Sally Coolatta
451ad75610 Cap on turn dampening
Fixes high speed bugs without removing the ability to turn at those speeds. Similar fix to what is in Ring Racers.
2022-06-02 21:36:16 -04:00
Sal
71de39bcbc Merge branch 'gametype-preference' into 'next'
Server Gametype Preference

See merge request KartKrew/Kart-Public!278
2022-06-02 03:03:43 +00:00
Sal
44b4d36151 Merge branch 'chat-flood-fix' into 'master'
Fix chat flood crashes (from STJr/SRB2!1698)

See merge request KartKrew/Kart-Public!280
2022-06-02 03:01:35 +00:00
JugadorXEI
894c4cffc2 no more bumpcode, no more magnet landing (again) 2022-06-01 17:47:09 +02:00
toaster
8fa22d562f Merge branch 'hole-punch-backport' into 'public_next'
Hole punching backport

See merge request KartKrew/Kart!445
2022-05-31 15:48:00 +00:00
AJ Martinez
a4a1f32b41 Fix chat flood crashes (from STJr/SRB2!1698) 2022-05-30 21:41:39 -05:00
Sally Coolatta
fdefc15a4d Merge branch 'master' into next 2022-05-30 18:23:30 -04:00
Sally Coolatta
2861e7688a Use old behavior when dipping below 35 with interp 2022-05-30 18:22:46 -04:00
Sal
a95a8d5c9f Merge branch 'prevent-permissions-footgun' into 'master'
Fail loudly when config isn't writable

See merge request KartKrew/Kart-Public!279
2022-05-30 22:16:06 +00:00
AJ Martinez
73aed4643b Use a temporary file instead of checking against config (from JugadorXEI) 2022-05-28 14:57:16 -05:00
AJ Martinez
7f46eb72bc Fail loudly when config isn't writable 2022-05-27 20:07:37 -05:00
toaster
77f2894bc3 Make a server report its preferred gametype on the MS listing, not its current one.
The intent is to stop servers from needing to dedicate their limited name/MOTD space to things like advertising `lessbattlevotes`, and to avoid "punishing" a server in visibility for allowing temporary gametype switches. However, this is possibly a controversial change, so I'm doing it in its own commit in case there's a clear consensus to revert.
2022-05-27 23:21:25 +01:00
toaster
7e7bd7dbb2 New kartgametypepreference cvar.
* A "canon" adaptation of the community-created server option `lessbattlevotes`.
* If set to "None", voting behaves as before.
* If set to "Race" or "Battle". that gametype is considered the preference.
    * The voting screen is always operated from the perspective of the preferred gametype.
    * If you're in an un-preferred gametype, the third vote option will always allow you to continue the gametype.
    * If the preferred gametype is Race and you've just exited a Battle map, Encore may now appear on the second vote option.
* A number of bugs with voting have been corrected.
    * If `kartencore` is on, the third vote option will now correctly have Encore applied.
    * If a custom EXE or malformed packet sends an Encore flag alongside a Battle gametype ID, actively strip it.
        * Just to note, clients do not enter Battle Encore with or without this change - this just prevents a promise the rest of the game couldn't fulfill.
2022-05-27 23:16:02 +01:00
toaster
7bf672a399 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public.git into next 2022-05-27 17:51:11 +01:00
toaster
16b0bd736b Merge branch 'public_speclil' into 'public_next'
[1.4 ver.] Da anti-grief stuff

See merge request KartKrew/Kart!474
2022-05-27 16:40:09 +00:00
toaster
34fd13be14 Merge branch 'ms-address-warning' into 'master'
Add warning and reset flow for non-default masterserver address

See merge request KartKrew/Kart-Public!277
2022-05-27 16:35:12 +00:00
toaster
37986f9775 Merge branch 'port-vanilla-sight' into 'next'
backport P_CheckSight from vanilla

See merge request KartKrew/Kart-Public!273
2022-05-27 16:34:19 +00:00
toaster
f46568868a Merge branch '2.2backport-ceilslope-light' into 'next'
2.2 Backports - add ceil slope double step-up/down and fix sprite/models all black in sector with light level of 256

See merge request KartKrew/Kart-Public!274
2022-05-27 16:32:05 +00:00
AJ Martinez
129fc2bbb1 Style cleanup 2022-05-25 18:22:43 -05:00
AJ Martinez
1441fda838 Clearly mark MS reminder + formatting touchup 2022-05-24 18:44:49 -05:00
AJ Martinez
8548d44109 Futureproofing mserv address conveyance 2022-05-24 18:25:18 -05:00
AJ Martinez
93647873de Add warning and reset flow for non-default masterserver address 2022-05-23 23:12:24 -05:00
Sal
d0addde847 Merge branch 'uncapped-next' into 'next'
Uncapped

See merge request KartKrew/Kart-Public!276
2022-05-22 01:28:01 +00:00
Eidolon
8a4d865880 Update interpolation during objectplace 2022-05-21 14:40:29 -05:00
Eidolon
64088d8f07 Tweaks for kart v1 MR comments 2022-05-21 12:32:40 -05:00
Eidolon
2fe0555e3f Make character cursor framerate-independent 2022-05-19 21:07:25 -05:00
Sally Coolatta
a4090db7b9 Use double instead of precise_t for FPS counter
Makes the displayed FPS more accurate to what it's actually displaying.

Also removed HUDTRANS from it -- stop it fading out during level transitions, it's annoying when I actually want to see the FPS during those bits.
2022-05-19 16:37:33 -04:00
Eidolon
507211b94e Remove hudlib getDeltaTime 2022-05-18 21:17:28 -05:00
Eidolon
de0d5d09e0 Don't interpolate during net lag 2022-05-17 20:05:54 -05:00
Eidolon
bf3748110c Copy tracer interp state for Jawz reticle 2022-05-06 10:11:08 -05:00