Commit graph

161 commits

Author SHA1 Message Date
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
James R
aee963f4e9 Replace LUA_PushLightUserdata with LUA_PushUserdata
See 7df6a309 and 83a87042. I didn't realize that light
userdata's metatable is shared--like numbers or strings.
So it cannot be paired with a metatable.

I also made a few minor tweaks to Lua cvars, other than
accounting for the double pointer in the userdata.
2021-05-02 21:59:23 -07:00
James R
92aeadc36b It is impossible for a string to be allocated in this case 2021-04-25 22:01:40 -07:00
James R
85914cc7cd Free zstring when switching to preset value
This is only applicable for bounded cvars (MIN, MAX),
since otherwise there's no way to allocate a zstring.
2021-04-25 21:55:04 -07:00
Monster Iestyn
70939a7a3d Set "allocated" flag to off if setting a string from PossibleValue afterwards, or if not setting a new value at all. 2021-04-25 21:08:12 +01:00
James R
ba4b6ec400 Reset wait period for COM_BufInsertText 2020-10-21 12:34:26 -07:00
James R
cb8f6097cf Merge branch 'save-netvars' into 'next'
Save netvars

See merge request STJr/SRB2!1179
2020-10-12 19:03:01 -04:00
James R
4b5cb8025b Show revert value of cvar with help command 2020-10-09 16:28:03 -07:00
James R
b67807dd04 When save/loading config use revert value for netvars if you are not the server 2020-10-09 16:22:17 -07:00
James R
15008f31a7 Merge branch 'sanity-meter-empty' into 'next'
Replace cvar initializers with a macro

See merge request STJr/SRB2!1178
2020-10-08 22:02:25 -04:00
James R
355cc1a697 Merge branch 'autocomplete-aliases' into 'next'
Autocomplete aliases in console

See merge request STJr/SRB2!1113
2020-10-08 20:30:07 -04:00
James R
b3d8ed7d43 Revert netvars after leaving a netgame 2020-10-06 23:32:11 -07:00
James R
dbd79a29a4 Replace C90's junk with a modest macro 2020-10-06 23:04:23 -07:00
James R
61cae79bd4 Fix off by one 2020-10-01 16:55:17 -07:00
Lachlan
5946b54a92 Fix compiler warning 2020-09-28 11:38:56 +08:00
Lachlan Wright
dbc32ea9ea Merge branch 'console-silly-characters' into 'next'
Get rid of some silly behavior with certain characters in console

See merge request STJr/SRB2!1110
2020-09-25 08:31:08 -04:00
James R
ca9cf25423 Fix netid overflow check 2020-09-05 23:23:54 -07:00
James R
30057e9268 Start netid at 1 to avoid CV_FindNetVar returning a regular cvar for netid 0 2020-09-05 22:03:14 -07:00
James R
aa19bce4a9 Autocomplete aliases in console 2020-08-14 00:00:45 -07:00
James R
4734b9d728 Stop treating apostrophes, parenthesis and curly braces as separate arguments 2020-08-13 21:11:45 -07:00
James R
34bd0d9fe7 Merge branch 'various-color-fixes' into 'next'
Various color fixes

See merge request STJr/SRB2!1060
2020-07-13 18:24:55 -04:00
James R
b9a24001d8 Merge remote-tracking branch 'origin/next' into remove-glide-2 2020-07-12 16:05:15 -07:00
kaysrishaq
0f9e3554e2 various color fixes 2020-07-12 07:39:52 -04:00
James R
8bcc2662d1 Merge branch 'netid-take-2' into 'next'
Use ordered id for netvars instead of shitty hash

See merge request STJr/SRB2!1010
2020-07-11 02:00:06 -04:00
Louis-Antoine
0858c2f6ed Fix autoexec file trying to set netvars when joining from command-line 2020-07-07 16:19:25 +02:00
Jaime Passos
5c5d907251 gr_ -> gl_ 2020-07-06 01:15:08 -03:00
James R
e741a7b3c7 Actually save the cvar name in demos 2020-07-04 12:51:07 -07:00
James R
7ec0b6c792 I meant consvar_number_of_netids to be exclusive :V 2020-06-20 00:53:51 -07:00
James R
3e52764935 Actually print a warning if the old demo id collides 2020-06-19 19:59:14 -07:00
James R
db34d70faa Cvar compatibility with older demos 2020-06-19 18:04:20 -07:00
James R
32134a01fe Save cvar names in demos; refactor cvar loading 2020-06-19 17:58:42 -07:00
James R
32773b71e0 Use ordered ids instead of hashes for cvar netid
Originally 6acd99c0a4
2020-06-19 16:36:36 -07:00
James R
536fb1ef2a Merge remote-tracking branch 'origin/master' into next 2020-04-18 17:20:33 -07:00
Louis-Antoine
e3cbdf8fab Use HAVE_BLUA as fuel for my fireplace 2020-03-19 18:36:14 +01:00
fickleheart
b66be478d9 Increase COM_BUF_SIZE
The config file is starting to get close to the old max,
so this should be enough headroom for a while...
2020-02-24 11:45:22 -06:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
James R
3ea51c943a Merge branch 'trim-floats' into 'master'
Trim the trailing zeros off floats for cvars

See merge request STJr/SRB2!716
2020-02-17 00:04:15 -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
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
5b08e1802d Trim the trailing zeros off floats for cvars 2020-01-20 23:14:26 -08: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
fickleheart
f8a3e3b898 Merge remote-tracking branch 'origin/next' into next-newcontrols 2020-01-04 09:57:09 -06:00
fickleheart
794d74c4d7 Merge remote-tracking branch 'origin/master' into newcontrols 2020-01-04 09:35:12 -06: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
b9cecea25c Hahahahahahahahahahahahaha 2020-01-01 15:52:23 -08:00
James R
ff47f911dc Fix command not running if it was split by COM_BufAddText
(Looks at 4865a190578b900b48571e74e0bd97bef88ea71b...)
2019-12-30 18:47:21 -08:00
James R
ab410652ae Fix unclosed quotes leaving the escape character in 2019-12-30 18:44:13 -08:00
James R
e49d12b731 Expose CV_FindVar
(cherry picked from commit 0e9d69d6a3759686ca8bb567817be650291ea0e1)
2019-12-26 18:30:34 -08:00
James R
4865a19057 One more optimization 2019-12-26 18:23:01 -08:00
James R
9673439628 e 2019-12-26 18:20:48 -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
James R
f26bdf00fe A system to encode flags in the command buffer 2019-12-26 18:12:10 -08:00
fickleheart
0047dba279 Fix float cvars saving wrong when set to max 2019-12-13 23:05:36 -06:00
Alam Ed Arias
d02648450a Let fix that GCC warning 2019-12-06 18:12:50 -05:00
James R
53cfba1f42 Use strncpy 2019-12-06 15:09:07 -08:00
Steel Titanium
d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
James R
359d8a2c25 Optimizations from LJ and generic functions 2019-11-13 14:26:28 -08:00
MascaraSnake
2a8e5b7bff Merge branch 'james-kart' into 'master'
My changes to Kart

See merge request STJr/SRB2Internal!406
2019-10-25 15:36:40 -04:00
James R
f0ee901160 Support adding to CV_FLOAT cvars with the Add command 2019-10-22 20:04:02 -07:00
James R
135619af8b Add a command to increment cvars 2019-10-22 20:03:45 -07:00
toaster
360ae45994 Make use of MINVAL and MAXVAL consistent in COM_Help_f. 2019-10-15 13:46:45 +01:00
toaster
8f3e59b43d Improved "HELP" command!
Ported from Kart, original commit also by me (toaster).
2019-10-15 13:36:04 +01:00
toaster
aa9bc574da * Fix cv_pointlimit's weird behaviour in match mode by standardising the switching between "named" and "range" values in CV_AddValue.
* Optimise M_ChangeCvar.
2019-10-15 12:24:31 +01:00
toaster
911fd9576b Rework min/max cvars to allow for "named" values outside their range!
Kart-port round 3, with the original commit written by me, toaster.
2019-10-15 11:23:59 +01:00
Monster Iestyn
03ce0adef8 Remove references to old console ports that slipped in from the 2.1 source code a while back 2019-08-20 14:13:38 +01:00
Monster Iestyn
66bc287688 Merge branch 'public_next' 2019-05-16 15:58:17 +01:00
Monster Iestyn
8ea9d0e95c Merge branch 'alias_recursion_hotfix_2' into 'master'
Alias recursion hotfix 2

See merge request STJr/SRB2!482
2019-05-08 11:25:15 -04:00
James R
36e678b292 Don't count down wait timer when executing a command 2019-04-14 15:17:47 -07:00
Monster Iestyn
797ca99f42 Detect infinite alias self-recursion mixed with other commands, such as in the case of alias a "echo test; a"; a.
(Unfortunately, this does not work if "wait" is used instead of "echo", but oh well)
2019-04-14 16:39:14 +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
mazmazz
e3d106d527 Merge remote-tracking branch 'public-gl/2122-version' into 2122-version 2018-12-22 23:42:25 -05:00
mazmazz
f1fea30045 Properly restrict EXECVERSION from cvar updates 2018-12-20 17:56:51 -05:00
mazmazz
60bcf92525 Adjust execversion retrieval in CV_FilterVarByVersion 2018-12-20 02:18:59 -05:00
mazmazz
657e7321f6 Decouple execversion from MODVERSION; add scheme for MINORMODVERSION 2018-12-17 13:38:23 -05:00
Alam Ed Arias
6fd66bdb49 Clear float equal warnings 2018-12-14 20:34:06 -05:00
mazmazz
93eda4e7c9 EXEC: Search for CFG by file path 2018-12-13 13:11:25 -05:00
mazmazz
3ceeb6a205 Register execversion and remove CV_SAVE because we write manually 2018-12-06 12:28:30 -05:00
mazmazz
0be61e8830 a stray if block 2018-12-06 12:03:53 -05:00
mazmazz
a5eb62b73e alwaysfreelook -> alwaysmlook string 2018-12-06 12:02:45 -05:00
mazmazz
70aa4ce18e Add alwaysfreelook2 and mousemove2 to config versioning
* Change alwaysfreelook2 to be consistent with alwaysfreelook (the only one that wasn't the same)
2018-12-06 11:59:34 -05:00
mazmazz
5b3a1e0c55 Implement EXECVERSION consvar to invalidate previous versions' default config values 2018-12-06 06:28:34 -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
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
e4f157786c Merge branch 'public_next'
# Conflicts:
#	src/Makefile
#	src/doomtype.h
#	src/hardware/hw_clip.c
#	src/hardware/hw_main.c
#	src/sdl12/sdl_sound.c
2018-11-10 19:18:34 +00:00
Monster Iestyn
2da335a1c4 Place limit on the amount of alias recursion allowed, to prevent cycles or otherwise excessive recursion 2018-11-10 13:08:26 +00:00
Monster Iestyn
23d28e6b8c Gutted the GP2X 2017-09-29 22:27:08 +01:00
Monster Iestyn
41ae71db4a postponed PSP 2017-09-29 20:34:16 +01:00
Monster Iestyn
49542cdaa1 Remove XBOXSTATIC and FILESTAMP, since only the XBOX port needed them 2017-09-29 19:46:23 +01:00
Alam Ed Arias
f1a347e55f Merge branch 'public_next' into master 2017-09-28 11:01:20 -04:00
Monster Iestyn
bae55a3af4 Don't display "x set to y" messages twice in the debugfile for consvars with CV_SHOWMODIFONETIME/CV_SHOWMODIF
(can't think offhand when those flags are actually used, but oh well)
2017-06-10 16:36:52 +01:00
toasterbabe
3efa66d537 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into charabilities_mk3
# Conflicts:
#	src/m_menu.c
2017-04-04 21:03:35 +01:00
toasterbabe
842c27e78b Let's not use terms like this so plainly, right? 2017-03-18 14:20:42 +00:00
toasterbabe
87ba3411a4 * Fixes forceskin causing desynchronisations, baby! Checks only when attempting to send.
* Makes the forceskin print more consistent with the skin print.

* Disabled the printing of availabilities.
2017-03-18 00:41:40 +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
toasterbabe
9fc757f388 Inuyasha: You were right.
* Changed the order of Record/Nights Attack and its level select menu option so that you go from the main menu to the map page to level select, rather than main menu to level select to map page.
* Cleaned up a lot of code.
2017-02-10 14:54:05 +00:00