Commit graph

638 commits

Author SHA1 Message Date
Lachlan Wright
191e2e094d Merge branch 'fix-spawn-desynch' into 'next'
Fix desynch when a player spawns

See merge request STJr/SRB2!977
2020-06-08 05:25:41 -04:00
LJ Sonic
e2b860dc28 Merge branch 'next' into 'fix-spawn-desynch'
# Conflicts:
#   src/p_map.c
2020-06-01 08:15:02 -04:00
lachwright
ae5d5b9546 Merge branch 'next' into dashmode-fixes 2020-05-30 18:13:21 +08:00
Monster Iestyn
755e9d659d Merge branch 'master' into next 2020-05-28 16:34:06 +01:00
Louis-Antoine
67eef5a37f Fix potential desynch when a player spawns 2020-05-28 11:03:35 +02:00
mazmazz
272362a86f Fix NOWIPE bugs with colormap fade and title card 2020-05-25 00:20:23 -04:00
SwitchKaze
b37c73b008 Make colors UINT16, increase color freeslots to 1024 2020-05-23 19:35:36 -05:00
toaster
a615de3504 Correctly reset map/timer for retries where the first map in Marathon Run is LF_NORELOAD (by forcing a reload when the retry option is used). 2020-05-15 21:17:57 +01:00
toaster
9686ad2d70 * In-game timer option! Doesn't tick in intermission or in lag, only when a frame is actually run. Realtime option remains default.
* Tweak retry behaviour to restart timer and not subtract life if you're on the first level and haven't hit a checkpoint yet.
2020-05-15 16:33:20 +01:00
toaster
2aa542d2bf Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into marathonmode
# Conflicts:
#	src/doomdef.h
2020-05-15 13:23:37 +01:00
toaster
d593e2e1bb Introducing Marathon Run. (I was going to call it Marathon Mode, but NiGHTS Mode being right next to it on the menu looked terrible.)
Basically a dedicated Record Attack-like experience for speedrunning the game as a continuous chunk rather than ILs. Has several quality of life features.

Benefits include:
* An unambiguous real-time bar across the bottom of the screen, always displaying the current time, ticking up until you reach the ending.
* Disable the console (pausing is still allowed, but the timer will still increment).
* Automatically skip intermissions as if you're holding down the spin button.
* Show centiseconds on HUD automatically, like record attack.
* "Live Event Backups" - a category of run fit for major events like GDQ, where recovery from crashes or chokes makes for better entertainment. Essentially a modified SP savefile, down to using the same basic functions, but has its own filename and tweaked internal layout.
* "spmarathon_start" MainCfg block parameter and "marathonnext" mapheader parameter, allowing for a customised flow (makes this fit for purpose for an eventual SUGOI port).
* Disabling inter-level custom cutscenes by default with a menu option to toggle this (won't show up if the mod doesn't *have* any custom cutscenes), although either way ending cutscenes (vanilla or custom) remain intact since is time is called before them.
* Won't show up if you have a mod that consists of only one level (determined by spmarathon_start's nextlevel; this won't trip if you manually set its marathonnext).
* Unconditional gratitude on the evaluation screen, instead of a negging "Try again..." if you didn't get all the emeralds (which you may not have been aiming for).
* Gorgeous new menu (no new assets required, unless you wanna give it a header later).

Changes which were required for the above but affect other areas of the game include:
* "useBlackRock" MainCFG block parameter, which can be used to disable the presence of the Black Rock or Egg Rock in both the Evaluation screen and the Marathon Run menu (for total conversions with different stories).
* Disabling Continues in NiGHTS mode, to match the most common singleplayer experience post 2.2.4's release (is reverted if useContinues is set to true).
* Hiding the exitmove "powerup" outside of multiplayer. (Okay, this isn't really related, I just saw this bug in action a lot while doing test runs and got annoyed enough to fix it here.)
* The ability to use V_DrawPromptBack (in hardcode only at the moment, but) to draw in terms of pixels rather than rows of text, by providing negative instead of positive inputs).
* A refactoring of redundant game saves smattered across the ending, credits, and evaluation - in addition to saving the game slightly earlier.
* Minor m_menu.c touchups and refactorings here and there.

Built using feedback from the official server's #speedruns channel, among other places.
2020-05-14 23:10:00 +01:00
sphere
0287c6956e Fix some errors and add some comments. Also, actnum is not an INT32. 2020-05-12 17:20:28 +02:00
Jaime Passos
39c5ab4e17 Merge remote-tracking branch 'origin/next' into gtr-fixes 2020-05-09 17:12:52 -03:00
lachwright
165b6c2435 Dashmode fixes:
- Don't force the player's default normalspeed and jumpfactor while not in dashmode
- Properly trim the fuse for followmobj ghosts spawned during dashmode
- Add deliberate dashmode ghosts for Metal's jet fume
2020-05-01 08:26:23 +08:00
toaster
da86c17ee1 Disable continues outside of no-save/Ultimate by default, but allow SOC to re-enable them globally.
Please look at the merge request description for a full explanation, since I know the vanilla team has been hashing this out and I don't want to add fuel to the fire without at least presenting a solid case.
2020-03-26 20:16:44 +00:00
Monster Iestyn
7a585e2498 Merge branch 'next' into demos-refactor
# Conflicts:
#	src/g_game.c

(also update g_demo.c)
2020-03-20 17:48:31 +00:00
Monster Iestyn
dd76be16cb Create G_FreeGhosts, for the benefit of G_DeferedInitNew (assuming it actually needs to do ghosts = NULL; at all) 2020-03-19 20:42:51 +00:00
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
Louis-Antoine
e3cbdf8fab Use HAVE_BLUA as fuel for my fireplace 2020-03-19 18:36:14 +01:00
Steel Titanium
5dac9c6875 Merge branch 'master' into next 2020-03-18 15:42:02 -04: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
SteelT
bd058ecc4b Merge branch 'viewpointswitch-fix' into 'next'
Fix incorrect newdisplayplayer in forced ViewpointSwitch

See merge request STJr/SRB2!814
2020-03-18 15:34:18 -04:00
Monster Iestyn
31b1188a3e Merge branch 'master' into next 2020-03-15 20:32:43 +00: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
Jaime Passos
70a103b9af Fix G_TOLFlag returning the wrong type 2020-03-02 00:20:53 -03:00
Louis-Antoine
29d8389461 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into resend-gamestate 2020-02-29 13:43:47 +01:00
Jaime Passos
7d77600e71 Make exitmove friendly, don't start empty intermission screens 2020-02-29 01:51:45 -03:00
Jaime Passos
4e7b47440f G_CoopGametype, for all the GT_COOP cases 2020-02-29 00:57:22 -03:00
Jaime Passos
6fb5a6efb6 Consider hide-and-seek as GTR_HIDEFROZEN 2020-02-28 23:52:33 -03:00
Jaime Passos
b103a792c0 Let spectators decide where they spawn
Also fixes some issues with tag gametypes
2020-02-23 19:23:00 -03:00
Jaime Passos
678935f26a Turn players IT if they join the game after the hide time in tag gametypes
Except in gametypes with hide time stasis, because they can't change team.
2020-02-23 17:02:50 -03:00
Jaime Passos
7439ab5296 Allow countdown time-up in any campaign gametype 2020-02-23 16:50:36 -03:00
Jaime Passos
a334542f34 Scan for emeralds in gametypes with Emerald Hunt 2020-02-23 16:41:39 -03:00
Jaime Passos
f313a0386f Don't reset player between maps in campaign gametypes 2020-02-23 16:40:16 -03:00
Jaime Passos
0362f53e9b Fix incorrect newdisplayplayer in forced ViewpointSwitch 2020-02-23 12:14:52 -03: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
Louis-Antoine
d02c4c0cc7 Add "resendgamestate" command 2020-01-31 15:57:04 +01: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
fickleheart
c3d14064e2 Convert simple movement to directionchar+analog
Analog + no directionchar is old analog (now known as
CS_LMAOGALOG because lmao if you still use it).
2019-12-30 15:05:24 -06:00
fickleheart
e0f35d207f Convert analog/directionchar cvars into 2-long arrays 2019-12-30 14:01:14 -06:00
fickleheart
631b5ff883 Disable lock-on in Ringslinger 2019-12-30 12:13:41 -06:00
fickleheart
b46cbe76d6 Somehow miss committing the ACTUAL stickyhold part 2019-12-30 11:36:59 -06:00
fickleheart
d980d526c8 Change defaults to match my personal settings 2019-12-30 11:36:40 -06:00
fickleheart
ebbe5938a8 Fix tailsbot flying weird with P1=standard P2=simple controls 2019-12-30 11:07:29 -06:00
fickleheart
f4e7227e11 Fix compilation errors 2019-12-30 11:01:56 -06:00
fickleheart
a9b80bf1f0 Merge branch 'master' into newcontrols
# Conflicts:
#	src/d_netcmd.c
#	src/g_game.c
#	src/g_game.h
#	src/m_menu.c
2019-12-30 10:47:09 -06:00
Jaime Passos
7676f11112 Merge remote-tracking branch 'origin/next' into respawndelaygametyperule 2019-12-30 12:09:45 -03:00
MascaraSnake
bf25128986 Merge branch 'mapload-refactor' into 'next'
Refactor map loading functions

See merge request STJr/SRB2!594
2019-12-29 10:04:27 -05:00
MascaraSnake
bb9093ff57 Merge branch 'kill-zshift' into 'next'
Eliminate all unnecessary uses of ZSHIFT

See merge request STJr/SRB2!580
2019-12-29 08:35:52 -05:00
James R
566b4a1626 Don't let us warp to a map that doesn't exist (really!)
Okay so 6464df9876, I WAS mistaken! Except that's
not how you check for a map's existence, at least not how the old map command
did it.
2019-12-29 02:44:27 -08:00
James R
0a014755b9 I'm still an idiot 2019-12-29 02:16:37 -08:00
James R
2ffff56b39 Who cares? 2019-12-29 02:15:48 -08:00
James R
19aafbfd0b Split map code checking from Command_Map_f 2019-12-29 02:14:02 -08:00
Steel Titanium
0d15f27026 Fix emerald hunt not working properly 2019-12-28 21:57:29 -05:00
Jaime Passos
e63f77ea1a Merge remote-tracking branch 'origin/next' into respawndelaygametyperule 2019-12-28 21:39:38 -03:00