Commit Graph

74 Commits

Author SHA1 Message Date
James R 7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08: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 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 339ceafdf0 Remove adminplayer from SERVERINFO (PACKETVERSION 2) 2020-01-12 20:21:35 -08:00
James R 2b95ea0135 Merge remote-tracking branch 'origin/master' into next 2020-01-12 14:17:52 -08:00
Louis-Antoine e9108de365 Replace all instances of XD_KICK with a SendKick function 2020-01-12 19:43:04 +01:00
Louis-Antoine 5b34923352 Fix node numbers being used in place of player numbers 2020-01-12 18:34:08 +01:00
James R 281f30c4fd Replace gametype with gametypename in SERVERINFO
PACKETVERSION 1
2019-12-30 22:18:55 -08:00
James R 6bd383621e More fine tuned versioning
You get a PACKETVERSION, for when some packets change format.

You get SRB2APPLICATION, for when you have big fucking mod.
2019-12-25 20:52:02 -08:00
Steel Titanium d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
MascaraSnake 3e7e749327 Merge branch 'reset-rollangle' into 'master'
Reset rollangle

See merge request STJr/SRB2Internal!494
2019-11-18 14:11:32 -05:00
Steel Titanium 2584241a44
Better ping implementation. 2019-11-17 20:22:47 -05:00
Jaime Passos 88fb22d688 Yeah, yeah... 2019-11-14 22:14:40 -03:00
MascaraSnake 7d69409cf7 Merge branch 'set-name-on-join' into 'master'
Set the player's name as soon as they enter the game

See merge request STJr/SRB2Internal!397
2019-10-25 15:38:21 -04:00
James R 29a5999a44 "NEWPING" might as well be the only ping 2019-10-22 19:39:26 -07:00
Louis-Antoine 88d239ac36 Set the player's name as soon as they enter the game 2019-10-19 17:09:18 +02:00
Monster Iestyn 07c02f075b Fix sprite-related console errors that occur in netgames whenever the game attempts to synch the player's state.
Turns out the code was using P_SetMobjStateNF to "fix" the player's state ...which got things all wrong, lol.
2019-10-17 18:22:06 +01:00
Monster Iestyn c696063260 Merge branch 'mprelated-tweaks' into 'master'
Various improvements and changes to multiplayer menu

See merge request STJr/SRB2Internal!300
2019-09-08 16:45:14 -04:00
toaster d26ff197dc * Store gravflip (resolves #206) and destscale in starposts. (Using the same field, taking advantage of the fact that object scale will always be positive!)
* Update the function signature of P_MixUp to accomodate both it and drawangle instead of doing it outside of the function.
* If the player is spawning from the start of the stage and it's from the ceiling, be in fall frames as requested (resolves #191).
2019-09-07 22:12:47 +01:00
Steel Titanium 1416312200
Move some cvars out of D_ClientServerInit and save them
Ported over from Kart
2019-08-26 20:38:32 -04:00
James R 89c4989987 Show a negative number to indicate ammo penalty 2019-08-26 16:07:17 -07:00
Monster Iestyn f3484f7ded Merge branch 'public_next'
# Conflicts:
#	src/config.h.in
#	src/d_clisrv.c
#	src/d_netcmd.c
#	src/doomdef.h
#	src/p_map.c
#	src/p_maputl.c
#	src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj
2019-08-20 13:54:48 +01:00
James R 19dd9a3c14 Kart discrepancies 2019-08-17 10:33:14 -07:00
James R 91502f1499 Don't send login final hashes to everyone
Someone thought it was a good fucking idea to make logins NetXCmds. NetXCmds
are sent to everyone however. Thankfully logins are two passes. And the second
pass uses a salt based on the playernum. Therefore, in order to actually make
use of the final hash, you'd have to be the same playernum as who originally
sent it. Still a stupid exploit.

P.S. The netcode is LOL XD by VincyTM -Telos
2019-07-15 16:14:00 -07:00
mazmazz 075f28b7c8 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
Digiku 8d56c2f486 Merge branch 'addons-backport' into '2122-version'
Addons Menu backport to vanilla

See merge request STJr/SRB2!384
2018-12-23 18:08:06 -05:00
mazmazz 37950341ec Merge remote-tracking branch 'public-gitlab/next' into addons-backport 2018-12-15 20:52:46 -05:00
mazmazz b32f50648d Merge branch 'addons_menu' into 'master'
Addons menu

See merge request KartKrew/Kart!8
2018-12-15 20:46:42 -05:00
Monster Iestyn f4ce770c1c try out using offsetof for these three macros in d_clisrv.h 2018-12-14 23:56:11 +00:00
Monster Iestyn 33c1ac33f5 Merge branch 'next' into 21-version
# Conflicts:
#	src/d_netcmd.c
2018-12-02 15:45:07 +00:00
wolfy852 e12890c84e s 2018-12-02 09:08:05 -06:00
wolfy852 2af04203ea Fix a dumb mistake 2018-12-02 08:57:35 -06:00
Wolfy b59718d3ad Remove hardcoded limit on admins
# Conflicts:
#	src/d_netcmd.c
2018-11-29 07:05:49 -06:00
Wolfy b8ce51bff2 Multiple admins
# Conflicts:
#	src/d_netcmd.c
#	src/d_netcmd.h
2018-11-29 06:46:59 -06:00
Monster Iestyn 1b2aea81dc Merge branch 'master' into next 2018-11-25 20:39:17 +00:00
mazmazz ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn 224c0fccdb Merge branch 'public_next'
# Conflicts:
#	src/Makefile.cfg
#	src/d_clisrv.c
#	src/p_setup.c
#	src/r_segs.c
#	src/r_things.c
2018-11-20 14:33:10 +00:00
Alam Ed Arias d14f87b8c6 Cleanup whitespace 2018-11-14 10:54:33 -05:00
Monster Iestyn 268bde3fdf Merge branch 'public_next'
# Conflicts:
#	src/d_netcmd.c
#	src/d_netcmd.h
#	src/dehacked.c
#	src/g_game.h
#	src/hardware/hw_draw.c
#	src/hardware/hw_main.c
#	src/lua_baselib.c
#	src/lua_hook.h
#	src/lua_hooklib.c
#	src/lua_hudlib.c
#	src/lua_libs.h
#	src/lua_maplib.c
#	src/lua_script.c
#	src/m_misc.h
#	src/p_mobj.c
#	src/s_sound.c
#	src/sdl12/mixer_sound.c
#	src/w_wad.c
2018-11-10 15:41:57 +00:00
Monster Iestyn d8f3a20e65 Merge branch 'Playerquit_hook' into 'next'
"PlayerQuit" Lua Hook

See merge request STJr/SRB2!127
2018-11-08 15:53:35 -05:00
toaster 6e07631cc9 MONSTER COMMIT.
OLD SPECIAL STAGES:
* Spheres in old special stages instead of rings!
* Individual timers in old special stages instead of a global one!
* Old special stages use a variant of the NiGHTS HUD now!
* Special stage damage in old special stages loses 5 seconds of time instead of 10 rings/spheres!
* All damage gained through old special stages is converted to special stage damage! As a consequence, the special spikeball has no need to be special anymore.
* Made emerald gaining function be based on special stage number rather than gained emeralds!
* Consistency with...

NiGHTS SPECIAL STAGES:
* Spheres now flash in bonus time. https://cdn.discordapp.com/attachments/400761370800422922/452590553100713984/srb20032.gif
* Sphere and ring mapthingnums are now less fucked up in 'em. (Rings are 300, same as usual, while Spheres are now 1706 replacing NiGHTS Wings.)

SPECIAL STAGES IN GENERAL:
* useNightsSS is now dead. Each individual special stage is now assessed for NiGHTS-mode behaviour based on maptol & TOL_NIGHTS.
* CRAWLA HONCHO\n CAN NOW BE\n SUPER CRAWLA HONCHO end tally modification now also includes a mini-tutorial on turning super. https://cdn.discordapp.com/attachments/400761370800422922/452844894113759233/srb20036.gif
* SONIC GOT A CHAOS EMERALD? https://cdn.discordapp.com/attachments/400761370800422922/452623869497573386/srb20034.gif

NiGHTS NON-SPECIAL STAGES:
* Colour Chips and Star Chips! Replaces Spheres and Rings of NiGHTS Special Stages.
* Colour Chips turn yellow in bonus time.
* Ideya!
* Its own "drowning" music!
* All of the object types for Dream Hill.
* GIF: https://cdn.discordapp.com/attachments/400761370800422922/452844894113759233/srb20036.gif

RANDOM BS:
* Turn super with the spin button instead of the jump button!
* Followmobj now correctly set with P_SetTarget instead of pointer assignment.
* Emerald hunt uses new sprites!
* Made unlock noise different from emblem gain noise! (It's the CRAWLA HONCHO CAN NOW TURN yadda yadda sound from S3K now.)
2018-06-03 22:41:54 +01:00
toasterbabe 844416855f Smiles follow-mobj initial support! Still using a Lua hook to follow closely behind, but now it doesn't need to be a generic thinkframe. Woo! 2017-10-02 14:08:58 +01:00
toasterbabe 0a1e055ba1 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop
# Conflicts:
#	src/m_menu.c
2017-08-05 22:13:14 +01:00
toasterbabe 50496970d1 Fix weird visual artifacting caused by restarting the level in co-op, which was a direct result of my code being messy. This is significantly better to deal with, anyways. 2017-07-03 15:43:29 +01:00
toasterbabe 66f56bbba3 * Menu always updates for file load... by doing the refresh in the drawing function, eep. Oh well.
* M_StartMessages when file loading goes wrong! (Determined by CONS_Alerts of warning level CONS_WARNING and CONS_ERROR happening after W_LoadWadFile has been called.)
* Now actively tries to keep your place on the menu if files are deleted between calls to preparefilemenu().
* More enums! DIR_ (for if you want to try embed more metadata in the dirmenu strings) and REFRESHDIR_ (for refreshing the menu and handling warnings).
* Handle changing size menu between calls to opendir() better.
* Don't crash on draw/enter attempt if one of the dirmenu's is null.
* Moved the addons menu to OP_MainMenu instead of MainMenu for now so it can be tested in MP without needing to mess with several menus.
* Display the amount of space used for serverinfo_pak's fileneeded on the addons menu, both visually and with a percentage.
2017-05-03 22:36:08 +01:00
toasterbabe ddf8db12af Big commit, sorry. I broke several things trying to get other things to work and it's only now that all the code that worked yesterday works today!
*P_LookForEnemies is now side-effect-less and only provides a pointer to the found mobj
*player-jumping is dead, long live PF_STARTJUMP
*per Mystic's request, CA2_GUNSLINGER has a targeting icon. It also has a more restricted vertical aiming range.
*mobj for this is in the game as requested
*fast teetering animation flag
*general code cleanup
2017-03-22 18:51:30 +00:00
toasterbabe 0060caaf1a Fixed synchronisation of skin changes and forceskin.
There's an outstanding issue - you can set forceskin to whatever you want to as the host. This needs to be fixed, but I'm commiting my successes first.
2017-03-17 23:11:32 +00:00
toasterbabe 60a2e26569 First attempt at making skin availabilities netgame-synchronised. However, I am completely unable to test this right now, since I'm on uni internet which is super locked down; in order to have it not get tangled up with anything else, I'm committing it now in a potentially broken state so that it can be reverted at a later date if necessary. 2017-03-16 18:57:42 +00:00
Monster Iestyn 1935a2ffa6 Merge branch 'public_next'
# Conflicts:
#	src/d_clisrv.c
#	src/doomdef.h
#	src/p_map.c
2017-01-19 16:54:47 +00:00
Monster Iestyn c0fb3fce73 Merge branch 'master' into next 2017-01-14 19:23:31 +00:00