Commit graph

11762 commits

Author SHA1 Message Date
James R
57c7df74d9 Rename hms123311.c to http-mserv.c
HMS lives on in our hearts!

(cherry picked from commit e8a2397deaacdd7dc6f80717755bc89161247cb5)
2020-05-14 17:28:55 -07:00
James R
fec8879797 Use Unlock_state here too
(cherry picked from commit a6ce21b450644a79b08b9533166704c7ef093816)
2020-05-14 17:28:55 -07: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
Monster Iestyn
ee520b4a0d split significant chunks of G_CheckDemoStatus into their own smaller functions, also give writing demo checksums its own little function 2020-05-14 20:57:21 +01:00
kaysrishaq
70896f9095 clean whitespace 2020-05-14 07:42:06 -04:00
kaysrishaq
c2a54acae3 Minor reorganization 2020-05-14 07:17:58 -04:00
kaysrishaq
fd31c5cd5e Update
Worked out some edge cases that had resulted in tracks restarting in the same format when they shouldn't - or tracks not switching to the other format when they should.

Removed stray }
2020-05-14 06:33:03 -04:00
kaysrishaq
53252f0d14 Merge branch 'next' into musicpref-var 2020-05-14 03:38:38 -04:00
James R
0b9c20cc70 ok 2020-05-13 17:52:49 -07:00
ZipperQR
6a9543b1c2 no message 2020-05-14 03:35:46 +03:00
James R
ae45333535 Revert "Use new two digit version number for HMS"
This reverts commit 7d2b3b0877.
2020-05-13 17:31:51 -07:00
James R
4b19a3321b Bind HMS connection with -bindaddr 2020-05-13 17:26:53 -07:00
James R
fb6572f080 Reset the masterserver address if the old one was set by the config 2020-05-13 17:26:34 -07:00
James R
35419cd77e Clarify where debug prints go when using masterserver_debug 2020-05-13 17:26:34 -07:00
James R
d91d7773be Use IPv4 for master server connections
Your server's address is gathered from the request, so it needs to be IPv4!
2020-05-13 17:26:34 -07:00
James R
7d2b3b0877 Use new two digit version number for HMS 2020-05-13 17:26:34 -07:00
James R
3e936a0878 Oops a debug condition snuck in there 2020-05-13 17:26:34 -07:00
James R
f9ec2a634c Fix switching the master server 2020-05-13 17:26:34 -07:00
James R
47bc3bff13 Put some mutex on CONS_Printf etc. hahaha 2020-05-13 17:26:34 -07:00
James R
ca8b3e95af Fucking multithreading in the server registration
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2020-05-13 17:25:52 -07:00
James R
a80c7a26dd Wait for threads before SDL_Quit (lol) 2020-05-13 17:25:52 -07:00
James R
5fff4c35fc Create cond if it doesn't exist when signaling 2020-05-13 17:25:52 -07:00
James R
00ffb29f95 Use malloc for hms 2020-05-13 17:25:52 -07:00
Steel Titanium
ff8987f745 Support for http downloads
(cherry picked from commit 6fcc06bf72cf3b95c30f04919e807c7aaacec68d)

(cherry picked just the libcurl stuff)
2020-05-13 17:25:52 -07:00
James R
7ebde22b77 Make mod update, room list and server list multithreaded
This took fucking ages and it still fails sometimes in edge cases, but I
don't give a FUCK right now.
2020-05-13 17:24:27 -07:00
James R
886bd34be5 Multithreading in my SRB2??? 2020-05-13 17:21:19 -07:00
James R
1584b7394b WHY THE FUCK DID I DO THIS 2020-05-13 17:21:18 -07:00
James R
676865c1b9 Oops 2020-05-13 17:21:18 -07:00
James R
9216406eea Handle NULL hms buffer 2020-05-13 17:21:18 -07:00
James R
197cffb7f5 Compiler errors: won't stop, can't stop 2020-05-13 17:21:18 -07:00
James R
4fcd24d848 masterserver_update_rate cvar determines wait between updates in minutes
The new default is 15 minutes as well. And if you think that's too long, I have
confirmed that the Master Server delists inactive servers after a whopping 40
minutes, at least.
2020-05-13 17:20:59 -07:00
James R
bb8b279cd4 Don't try to update right after registering 2020-05-13 17:20:59 -07:00
James R
eac7b2e060 Add a hack so the 'All' room isn't display for hosting 2020-05-13 17:20:59 -07:00
James R
4fd707984b Kill the old mserv, long live HMS! 2020-05-13 17:20:59 -07:00
James R
1e4e5275b5 Clean up header text 2020-05-13 17:18:27 -07:00
James R
1f295b8e50 HTTP update alert 2020-05-13 17:18:27 -07:00
James R
1f04f8e0c0 Fix some goofs 2020-05-13 17:18:27 -07:00
James R
ec1d4c9a91 Bruh 2020-05-13 17:18:27 -07:00
James R
bcfbd5563b Clean up a bunch of stuff and follow the Master Server API more closely 2020-05-13 17:18:27 -07:00
James R
b15b90f217 Windows certs do work, thanks Steel! 2020-05-13 17:18:27 -07:00
James R
a4bbc06f25 Handle more errors 2020-05-13 17:18:27 -07:00
James R
f26ad18e28 Kill masterserver_token 2020-05-13 17:18:27 -07:00
James R
273e1ff170 This will be the Master Server in 2020 2020-05-13 17:18:27 -07:00
James R
bec97faf5c Use https because my web server redirects 2020-05-13 17:18:27 -07:00
James R
768ad80a97 strtok can return NULL 2020-05-13 17:18:27 -07:00
James R
9e0c1b3f1f This time I fucked up 2020-05-13 17:18:27 -07:00
James R
bec233515e Windows gaysed: the sequel 2020-05-13 17:18:27 -07:00
James R
acdced643c Windows is weird 2020-05-13 17:18:27 -07:00
James R
2cfb04f90b masterserver_debug to set CURLOPT_VERBOSE 2020-05-13 17:18:27 -07:00
James R
8228182823 Don't show "All" room when hosting 2020-05-13 17:18:27 -07:00