Commit graph

9339 commits

Author SHA1 Message Date
Louis-Antoine
b0b22b53d6 Ignore disconnected players in tag gametypes
Disconnected players do not become IT at round start.

If all non-ITs are disconnected, the round ends.

If all ITs are disconnected, one of the non-ITs
becomes IT, or the round ends if in Hide & Seek.
2020-01-23 19:58:13 +01:00
Louis-Antoine
ce20642fa7 Do not protect non-IT players in tag gametypes 2020-01-23 18:52:16 +01:00
James R
f0daea39d4 Don't set controls to keys out of array bounds
Shout-out to TAG's config that somehow had
`setcontrol2 "custom3" "KEY931926528"`, cuasing the game to crash only in
Splitscreen.
2020-01-22 22:19:00 -08:00
Louis-Antoine
fb28ede660 Rename R_IsPointInSubsector to R_PointInSubsectorOrNull/Nil
The old name made it really easy to accidentally read
R_IsPointInSubsector as R_PointInSubsector, and anyway it
didn't even make sense...
2020-01-22 16:58:57 +01:00
Louis-Antoine
cfec8609f9 Fix missing declaration 2020-01-22 04:01:06 +01:00
Louis-Antoine
f209721ded Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into keep-body
# Conflicts:
#	src/g_game.c
#	src/p_setup.c
2020-01-22 03:57:22 +01:00
Louis-Antoine
2527b6c389 Teleport disconnected players to starpost if they fall in a pit 2020-01-22 03:20:27 +01:00
Louis-Antoine
412ba38a81 Refactor player spawning code a little 2020-01-22 03:19:15 +01:00
Louis-Antoine
d03c928baa Give flashing tics to disconnected players and prevent drowning 2020-01-22 03:14:44 +01:00
Louis-Antoine
73d0549fa4 Ignore players towards exit count 30 seconds after their disconnection 2020-01-22 03:11:05 +01:00
Louis-Antoine
d374bf4f9b Let clients rejoin the server without losing their status
This is accomplished by simply preserving
the player's body after disconnecting.

Bodies will despawn after the number of minutes
specified by the "rejointimeout" console variable (float).
A value of 0 disables the feature completely.

Clients rejoining are identified by their IP address,
and may rejoin even if the server is full or joins are disabled,
for as long as their body remains.

From a technical standpoint, when the user disconnects,
the player they were controlling does not leave,
the underlying player_t just keeps working normally,
except it does not receive any input anymore.
When the user reconnects, they are simply "relinked"
to their player_t.

Those "soulless" players can be identified through
their "quittime" field, which is the number of tics
elapsed since the user disconnected, or zero
if still connected. "quittime" is exposed to Lua.
2020-01-22 03:05:08 +01:00
James R
2373a0aa83 Actually actually match the old behavior and check existing levelflats in P_AddLevelFlatRuntime BRUH 2020-01-21 16:47:47 -08:00
SteelT
a6d49eaaa7
Merge pull request #447 from ConfusionAlphaX/local-resynch-fix
Fix title screen broken when leaving during resynch
2020-01-21 19:09:15 -05:00
James R
d90c0b8fbd Don't check "Too many flats in level" with P_AddLevelFlatRuntime
Also moved the debug down in case anyone uses that.
2020-01-21 15:35:07 -08:00
James R
9cd101c68d Revert "Fix Ploadflat closing the game with "Too many flats in level" error message"
This reverts commit ea129f701c.
2020-01-21 15:35:07 -08:00
James R
f297f4ff56 Sonic is dead again 2020-01-21 12:24:24 -08:00
James R
c347254e80 Reorder Sonic's ass so the OpenGL wipe doesn't see garbage 2020-01-21 12:23:34 -08:00
James R
dfcd058c80 (BRUH MOMENT) activettscale was -1, so do recache after it's set 2020-01-21 12:21:18 -08:00
Zwip-Zwap Zapony
49a4c7d5f3 Separate "turnmultiplier"s for splitscreen players
This fixes player 2 using player 1's "cam_turnmultiplier"
instead of player 2's "cam2_turnmultiplier"
2020-01-21 14:53:05 +01:00
James R
2d8ea7125c Remove unnecessary optimization 2020-01-20 15:36:27 -08:00
James R
0d460aed1d Merge branch 'gl-dropshadows' into 'next'
OpenGL drop shadows

See merge request STJr/SRB2!703
2020-01-20 16:52:40 -05:00
Zwip-Zwap Zapony
c1097813f4 Fix "cam2_turnmultiplier"
In splitscreen stuff, player 2's "cam2_turnmultiplier" implementation
was wrong compared to player 1's "cam_turnmultiplier"
This commit makes player 2's multiplier work just like player 1's does
2020-01-20 16:14:20 +01:00
Confusion
ad505a6fe7 Fix title screen broken when leaving during resynch 2020-01-19 17:55:22 +03:00
James R
a7770c3e97 Merge branch 'add-exitmove-to-menu' into 'next'
Put cv_exitmove in the server options menu

See merge request STJr/SRB2!704
2020-01-19 02:18:49 -05:00
James R
9dbc54284e Opt into new MUSICDEF format (2.2.0 compatibility)
The "VERSION" directive enables features available in a certain version of
SRB2. It may be used as "VERSION 2.2.0".
2020-01-18 23:12:30 -08:00
James R
1317dba3e4 Refactor MUSICDEF parsing, actually count lines
If you use strtok for (CR)LF, it'll skip the empty lines bruh.
2020-01-18 22:17:47 -08:00
Louis-Antoine
512435c59f Fix mouse in controls setup menu 2020-01-18 20:18:20 +01:00
Tatsuru
8348123a70 Goal posts 2020-01-18 13:15:24 -03:00
LJ Sonic
eed69ab94d Merge branch 'mapthingflagextradehackedconstant' into 'next'
Mapthing flag EXTRA DeHackEd constant

See merge request STJr/SRB2!705
2020-01-18 10:31:29 -05:00
Jaime Passos
cdc3386d48 Fix missing constant 2020-01-18 12:10:48 -03:00
Tatsuru
0c7c5742a8 Put cv_exitmove in the menus 2020-01-18 12:06:04 -03:00
James R
e82d19572d Merge branch 'intangable' into 'next'
Add FF_INTANGABLEFLATS as an alternative spelling for FF_INTANGIBLEFLATS

See merge request STJr/SRB2!702
2020-01-18 00:49:08 -05:00
James R
94a2f0bb4f Don't draw Tails' tails in first person (MF2_LINKDRAW) 2020-01-17 20:56:32 -08:00
James R
762223db7c Duplicated code is gone, so sad 2020-01-17 20:53:36 -08:00
Sally Cochenour
43828f265c Use shadow cvar 2020-01-17 22:20:04 -05:00
Sally Cochenour
ba51f83aaf Merge branch 'next' into gl-dropshadows 2020-01-17 22:19:51 -05:00
James R
9a1cb0e30e Merge branch 'software-dropshadows' into 'next'
Software dropshadows

See merge request STJr/SRB2!660
2020-01-17 18:56:13 -05:00
James R
96c91ce716 Merge branch 'r_ispointinsubsector' into 'next'
Add R_IsPointInSubsector to lua baselib

See merge request STJr/SRB2!700
2020-01-17 18:24:04 -05:00
Jaime Passos
999094f2f6 backwards compat 2020-01-17 16:11:17 -03:00
Alam Ed Arias
b09341383f Merge branch 'master' into next 2020-01-17 11:12:10 -05:00
Alam Ed Arias
b38921ff53 Merge branch 'mserv-is-dumb-and-what-else-is-new' into 'master'
Fuck NONET

See merge request STJr/SRB2!699
2020-01-17 11:11:02 -05:00
MascaraSnake
14c8fdd3aa Merge branch 'intangable' into 'next'
Fix FF_INTANGABLEFLATS typo

See merge request STJr/SRB2!701
2020-01-17 03:13:45 -05:00
fickleheart
f59ed6b2f4 DOUBLE DAMNIT 2020-01-17 00:34:57 -06:00
fickleheart
d39d8506ca Let nerds turn off shadows 2020-01-17 00:20:10 -06:00
fickleheart
919661ff8f Give me a break 2020-01-17 00:18:00 -06:00
fickleheart
4ca44f2d57 Bosses need dropshadows too 2020-01-17 00:16:15 -06:00
fickleheart
9a4ad20947 DAMNIT 2020-01-17 00:13:13 -06:00
fickleheart
f0843cba13 Let vissprites have shadows too
fuck it, hopefully it works
2020-01-17 00:13:05 -06:00
Jaime Passos
8bfdb52231 add R_IsPointInSubsector to lua baselib 2020-01-17 00:49:43 -03:00
Jaime Passos
7adc108a2a typoe 2020-01-17 00:34:31 -03:00