Commit graph

42 commits

Author SHA1 Message Date
GoldenTails 03b7a1c368 Make the player optional for COM_BufInsertText and COM_BufAddText.
When no player is supplied, the command will run for all players.
2020-07-26 12:08:33 -05:00
kaysrishaq 7f9175033d minor lua fixes
minor lua fixes
2020-07-14 01:34:57 -04:00
James R d4c08a8410 Merge branch 'lightmemedata' into 'next'
Cvars returned by CV_FindVar did not work with userdataType

See merge request STJr/SRB2!754
2020-04-09 19:48:39 -04:00
Louis-Antoine e3cbdf8fab Use HAVE_BLUA as fuel for my fireplace 2020-03-19 18:36:14 +01:00
James R 7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
James R deaf5cfa28 LUA_PushLightUserdata takes the fun out of lib_cvFindVar 2020-02-02 15:19:19 -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 2b95ea0135 Merge remote-tracking branch 'origin/master' into next 2020-01-12 14:17:52 -08:00
LJ Sonic 6eba68bc3b Merge branch 'fix-node-player-mixups' into 'master'
Fix node player mixups

See merge request STJr/SRB2!684
2020-01-12 15:57:20 -05:00
Louis-Antoine e9108de365 Replace all instances of XD_KICK with a SendKick function 2020-01-12 19:43:04 +01:00
James R 3b90571987 Merge branch 'local-lua-commands' into 'next'
Local Lua commands + no magic numbers

See merge request STJr/SRB2!602
2020-01-08 16:14:30 -05:00
James R 12e87d58b4 Merge branch 'findvar' into 'next'
CV_FindVar for Lua

See merge request STJr/SRB2!583
2020-01-02 20:54:16 -05:00
James R e3fcd860de Merge remote-tracking branch 'origin/next' into local-lua-commands 2019-12-30 15:08:34 -08:00
James R d670139404 Revert revert revert
This reverts commit 6546e3c3bc.
This reverts commit 8a15e9abc4.
2019-12-30 12:31:53 -08:00
James R 65921c1702 Improve COM_AddCommand boolean deprecated warning 2019-12-29 21:09:07 -08:00
James R 802ef0aba1 COM_LOCAL makes your commands NetXCmd free, FUCK NetXCmd 2019-12-29 21:07:28 -08:00
James R 6546e3c3bc No. 2019-12-29 21:02:42 -08:00
James R dc757f3086 Fuck magic numbers; COM_ flags for Lua commands! 2019-12-29 21:00:38 -08:00
James R 8a15e9abc4 Bro player 2 can't use the console 2019-12-29 21:00:38 -08:00
James R 7df6a3090a Lua CV_FindVar function
(cherry picked from commit b5746c231d17cd7b58c6b633e242d5ad26ad7017)
2019-12-26 18:30:34 -08:00
James R cb29a9dd0a CV_NOLUA for when a cvar should not be changed via Lua 2019-12-26 18:15:19 -08:00
Steel Titanium d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
Monster Iestyn d1105abdb3 Merge branch 'public_next'
# Conflicts:
#	src/d_netfil.c
2019-08-25 18:18:59 +01:00
Monster Iestyn 2dd5f1abe3 Fixes for lib_cvRegisterVar (the Lua version of CV_RegisterVar):
* Make sure the consvar's properties are all initialised to zeros as defaults
* Error if the consvar is not given a name
* Error if the consvar has CV_CALL but no call function
* Error if the consvar has CV_NOINIT but not CV_CALL
2019-08-20 18:18:29 +01:00
toaster 7bff305672 * Strip the word "function" from INLEVEL error messages, since they're now shared between access and function cases.
* Move it into lua_script.h, so it's available to everything that needs it.
2019-07-30 17:57:57 +01:00
toaster 69e573517f Fix lua scripts erroring on the title screen because they're run there but it's not counted as GS_LEVEL (aka #168). 2019-07-30 17:48:13 +01: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
Monster Iestyn 33c1ac33f5 Merge branch 'next' into 21-version
# Conflicts:
#	src/d_netcmd.c
2018-12-02 15:45:07 +00:00
Wolfy b8ce51bff2 Multiple admins
# Conflicts:
#	src/d_netcmd.c
#	src/d_netcmd.h
2018-11-29 06:46:59 -06:00
mazmazz ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn be5d0406bd Merge branch 'public_next'
# Conflicts:
#	src/hardware/hw_md2.c
2018-07-31 19:41:54 +01:00
Monster Iestyn 82d953bbc2 Fixed the Lua crash exploit. 2018-07-04 20:15:36 +01:00
Monster Iestyn 49542cdaa1 Remove XBOXSTATIC and FILESTAMP, since only the XBOX port needed them 2017-09-29 19:46:23 +01:00
Monster Iestyn 3795a15164 Merge branch 'public_next' 2017-08-16 20:11:33 +01:00
Yukita Mayako 720987367a Prevent cvar naming conflicts from pointing Lua to the wrong internal data. 2017-08-08 14:27:02 -05:00
Monster Iestyn 1462c638cb Added the "lua_lumploading" variable for restricting certain Lua functions to lump load time only 2017-04-25 21:45:53 +01:00
Monster Iestyn 2ac3f68438 Added in-level checks to a lot of these functions and tables for Lua use
This makes it less likely for the game to crash when stuff is used outside a level when they shouldn't be
2017-01-18 22:02:28 +00:00
Inuyasha f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Alam Ed Arias 8a9759a3e4 SRB2 2.1.8 release 2014-04-19 13:41:29 -04:00
Alam Ed Arias 02a3b0776c SRB2 2.1.7 release 2014-04-14 01:14:58 -04:00
Alam Ed Arias b93cb1b65a SRB2 2.1 release 2014-03-15 13:11:35 -04:00