Commit graph

555 commits

Author SHA1 Message Date
Monster Iestyn
dcb4ce8cb9 Created g_demo.c/.h, for the demo recording and playback code that formerly lived in g_game.c 2020-03-19 20:09:55 +00:00
SteelT
e3a5164ddf Merge branch 'deadzone-sigfpe-fix' into 'master'
Fix division-by-0 crash from 100% gamepad deadzones, and lack of input from 0% deadzones

See merge request STJr/SRB2!838
2020-03-18 15:39:04 -04:00
Monster Iestyn
f4cb6e1f5e Include r_skins.h instead of r_things.h in many files where all they wanted from it was skins stuff
(oddly enough, this actually revealed some secret file dependencies previously included via r_things.h! I also needed to include d_player.h in r_skins.h itself it seems)
2020-03-09 13:54:56 +00:00
Zwip-Zwap Zapony
bce6349b1d More gamepad deadzone tweakage 2020-03-04 21:44:57 +01:00
Zwip-Zwap Zapony
df220aa2c2 Hotfix for 100% deadzone returning 0 input
It makes more sense for 100% deadzone to just make it so that
you have to push the axis all the way to trigger it,
rather than 100% deadzone resulting in no axis input
ever happening... So, let's make it be the former way instead
2020-03-04 21:11:55 +01:00
Zwip-Zwap Zapony
27e084a827 Fix division-by-0 crash with gamepad deadzones
Fix division-by-0 crash with gamepad deadzones
The problem was that it checked if A was more than B,
then lowered A to a max value, then subtracted B from A,
then divided something by that, without checking if A minus B was 0,
allowing division by 0 if B was the same as that max value

This fixes that by making sure that A is less than the max value
2020-03-04 17:31:52 +01:00
Steel Titanium
76f26cda24 Merge branch 'master' into next 2020-02-21 21:01:29 -05:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
James R
2d8522b9ec Merge branch 'titlecard-options' into 'next'
Allow more options for when the titlecard shows up

See merge request STJr/SRB2!765
2020-02-18 21:52:03 -05:00
Monster Iestyn
2b3034a7af Merge branch 'master' into next 2020-02-18 17:38:05 +00:00
James R
7ed7e53c81 Merge branch 'tolfix' into 'master'
Don't freeslot TOL_ twice

See merge request STJr/SRB2!779
2020-02-16 23:52:45 -05:00
Jaime Passos
ae013108ab Merge remote-tracking branch 'origin/next' into fix-overtime 2020-02-17 00:48:42 -03:00
fickleheart
187bd9ab23 Merge remote-tracking branch 'upstream/master' into titlecard-options 2020-02-16 21:32:27 -06:00
Jaime Passos
5dc0f0649e Fix overtime not working 2020-02-15 13:07:53 -03:00
Jaime Passos
7bc58c4c0e Add MAXTOL 2020-02-12 13:41:30 -03:00
James R
ae2041d686 Remove extra tokens if we got all 7 emeroods 2020-02-11 19:36:09 -08:00
fickleheart
19cdb002ab More fixes for titlecard option stuff 2020-02-09 17:53:50 -06:00
Jaime Passos
2d0e72d756 Fix broken GT_ constants with custom gametypes 2020-02-08 21:40:30 -03:00
fickleheart
fed8167a81 Allow more options for when the titlecard shows up 2020-02-08 11:13:40 -06:00
Jaime Passos
cf7b4d826a Remove redundancy 2020-01-26 23:46:07 -03:00
LJ Sonic
53e2cfbde2 Merge branch 'keep-body' into 'next'
Let clients rejoin the server without losing their status

See merge request STJr/SRB2!722
2020-01-24 18:50:03 -05: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
412ba38a81 Refactor player spawning code a little 2020-01-22 03:19:15 +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
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
Alam Ed Arias
b09341383f Merge branch 'master' into next 2020-01-17 11:12:10 -05:00
Louis-Antoine
9504ba96da Increase maximum and default chat width 2020-01-15 15:36:11 +01:00
James R
735289502c Call it KEYWORDS 2020-01-08 14:41:38 -08:00
James R
74364b84f9 Revert "Oh right, the keywords..."
This reverts commit a00dfcf420.
2020-01-08 14:26:47 -08:00
fickleheart
6211c80a69 Mixed code and declaration stuff 2020-01-08 00:22:17 -06:00
fickleheart
5abf0c24f9 oh god I forget why this is here but let's not remove it now 2020-01-08 00:21:03 -06:00
fickleheart
f8a3e3b898 Merge remote-tracking branch 'origin/next' into next-newcontrols 2020-01-04 09:57:09 -06:00
fickleheart
f0e6a56b6b Merge branch 'newcontrols' into next-newcontrols 2020-01-04 09:56:24 -06:00
fickleheart
34fe284416 Fix camera stuff in splitscreen 2020-01-04 09:54:56 -06:00
fickleheart
794d74c4d7 Merge remote-tracking branch 'origin/master' into newcontrols 2020-01-04 09:35:12 -06:00
fickleheart
eac8732bc8 Make holding both turn keys freeze camera direction (broke in merge) 2020-01-03 23:26:31 -06:00
Alam Ed Arias
a26c5f5428 Merge branch 'master' into next 2020-01-03 14:56:37 -05:00
LJ Sonic
c6aec51d99 Merge branch 'ungrab-mouse-in-menus' into 'master'
Let the mouse move freely when a menu is open or game is paused

See merge request STJr/SRB2!617
2020-01-02 18:48:38 -05:00
Louis-Antoine
5bde4df439 Grab mouse again when closing menu, unpausing, etc 2020-01-02 00:45:28 +01:00
James R
0c40a466d8 Merge remote-tracking branch 'origin/master' into next 2020-01-01 15:39:05 -08:00
James R
48c83be89e Merge branch 'respawndelaygametyperule' into 'next'
Gametype ruleset changes

See merge request STJr/SRB2!585
2020-01-01 17:49:53 -05:00
fickleheart
b22de48c03 Merge branch 'next' into next-newcontrols
# Conflicts:
#	src/g_game.c
#	src/p_setup.c
2019-12-31 12:58:36 -06:00
lachwright
d3c56cd807 Remove flight indicator when AI Tails is taken over by second player 2019-12-31 16:48:29 +08:00
James R
3112dff345 Merge branch 'oops' into 'next'
Fix unknown gametype for map command crashing the game

See merge request STJr/SRB2!606
2019-12-31 01:34:39 -05:00
James R
34687e85d7 Merge branch 'emeraldhunt-fix' into 'next'
Fix emerald hunt not working properly

See merge request STJr/SRB2!593
2019-12-31 01:34:17 -05:00
fickleheart
0eb65d0fa7 Fix tailsbot behavior that broke with Simple mode 2019-12-30 23:58:58 -06:00
James R
5e94ca07bc Use gametypecount in G_GetGametypeByName 2019-12-30 17:57:38 -08:00
fickleheart
2c45ecbaa5 Fix camera reset button 2019-12-30 15:34:43 -06:00
fickleheart
a51f2500e0 Update playstyle menu handling to use analog/directionchar combo 2019-12-30 15:15:37 -06:00