Commit graph

194 commits

Author SHA1 Message Date
toaster
80d19a8458 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into save_p-unglobal-alt
# Conflicts:
#	src/g_demo.c
2023-01-03 19:45:18 +00:00
James R
77d54a09fe Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive 2023-01-01 00:23:23 -08:00
Sally Coolatta
38a35b6f78 Make save_p / savebuffers not global
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.

Also fixed some scary mix-ups in some of the Lua archiving code.
2023-01-01 00:22:56 -08:00
toaster
42a6b03e48 Remove "circuitmap"
An effectively useless global scope boolean that literally checks for the presence of a finish line, created in and used only by things we inherited from vanilla SRB2
2022-12-31 23:27:59 +00:00
toaster
e7c79ab461 M_CheckNetUnlockByID
System for netsyncing unlocks, inspired by but with nowhere near as many moving parts as (STJr/SRB2!1756).
* `gamedata->unlocked[MAXUNLOCKABLES]` is duplicated to `netUnlocked[MAXUNLOCKABLES]` (or all `true` in `dedicated`
* New `local` boolean for M_SecretUnlocked
* Removed last vestiges of SRB2 special stage token code because it occupied the spot in the netsave we wanted to use.
* Correct typing of multiple `m_cond` functions that returned `boolean` constants as `UINT8`s.
2022-12-09 17:26:52 +00:00
toaster
243f38227c Rework time limit a bit
- Make timelimitintics handled a bit more like gamespeed, encore, frantic, etc - update on mapload/starttime, not during gameplay
    - Use default setting if can't change rules - this is a surprise tool that will help us later
- Have it properly update when adjusting gametype from the menu
    - Cleaned up SV_StartSinglePlayerServer to do this
- Remove CV_SAVE to prevent time limit bruh moments
2022-10-11 23:00:44 +01:00
James R
08f9628e6c Remove kartminimap, kartcheck, kartcomeback cvars 2022-10-01 17:04:48 -07:00
toaster
fe49543456 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers 2022-09-24 19:53:36 +01:00
toaster
a4c73b204a Kill spstage_start and spmarathon_start 2022-09-23 13:07:59 +01:00
Sally Coolatta
f89d8d15c2 Properly separate SPB & Shrink cooldowns
Also refactors some of the result -> type & amount code
2022-09-23 03:35:18 -04:00
toaster
48e9138dda Refactoring ahoy
* Instead of doing constant G_MapNumbers when finding the relationship between maps and cups...
    * Add a cache of level IDs to cups, to go with the strings.
    * Add a cache of the cup pointer to maps, so we don't have to search through all cups to find our map. (done in P_InitMapData)
    * Pre-emptive work: G_IsSpecialStage and P_GetNextEmerald now reference cup data instead of a hardcoded ID set.
* Remove a bunch of old stuff from mapheaderinfo_t/associated, and reorder what stays
    * Countdowntimer? 💥
    * Startrings? 💥
    * sstimer/ssspheres? 💥
    * forcecharacter? 💥 (distinct from forceskin)
    * interscreen? 💥
    * sstage_start/end and smpstage_start/end? 💥💥💥💥
    * You've been blocked
* G_MapNumber now returns a special NEXTMAP_INVALID if not found, for more consistent reference.
* Incorporate a good chunk of the `edit-headers` branch. Can't clear maps individually because of the new restrictions on sequential mapheaders, but we can add a "disable in vote screen, not even for map hell/archive" flag to a map at some future juncture for equivalent functionality...
2022-09-22 17:14:41 +01:00
toaster
1a284ec7c6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers
# Conflicts:
#	src/d_netcmd.c
2022-09-17 13:57:26 +01:00
Sally Coolatta
2fddc9f343 Merge branch 'master' into big-large-map-markers 2022-09-10 16:01:02 -04:00
James R
37c3a55dda Fix conflicts 522467a88 2022-09-05 11:56:30 -07:00
Sally Coolatta
ebb34ff9d4 Lap based power level 2022-08-14 06:00:37 -04:00
Sally Coolatta
c8718b25ff REMOVE hyubgone + all of the other bullshit we did to try and make it show up less 2022-05-22 21:17:14 -04:00
LJ Sonic
c977a7d451 Fix again 2022-03-18 18:31:46 +00:00
LJ Sonic
ef1ff6c94b Fix incorrect error message during Lua archiving 2022-03-18 18:31:38 +00:00
Nev3r
2e7e61f787 Remove &, since args and stringargs are arrays 2022-03-18 17:28:15 +00:00
Nev3r
de0119fd78 Forgot the stringargs. 2022-03-18 17:28:06 +00:00
Nev3r
7c8beb9229 Bugfix - Fix sporadically occurring incorrect userdata types in Lua, caused by previously loaded userdata which didn't get invalidated in previous sessions.
Invalidate userdata for line and mapthing args.
Invalidate userdata for slopes and their normal, origin and direction vectors.
2022-03-18 17:27:57 +00:00
James R
b1890385f4 Revert "Merge branch 'lightmemedata' into 'next'"
This reverts commit 7ff3e7f18b, reversing
changes made to dc37cdf2a6.
2022-03-18 12:54:13 +00:00
toaster
c1f3237157 Boss API + assorted relevant bugfixes, will go over the featureset of this branch with a fine toothed comb when it's time to write the merge request description so this is all you're getting right now 2022-02-24 21:19:03 +00:00
Sally Coolatta
e5d899412c FIX PARTIES 2021-04-23 03:53:35 -04:00
toaster
b3d006b093 structs gunched 2021-04-17 00:27:13 +01:00
Sally Coolatta
de1f67b72a Use strings in the map header for next level, marathon next, thumbnails, minimaps, encoremaps, and tweakmaps 2021-04-09 21:10:46 -04:00
Sally Coolatta
d165e723be Make it through Lua 2021-03-01 01:49:05 -05:00
Sally Coolatta
9d7ec0ab8f Merge SRB2 next
Probably doesn't compile yet, but I got rid of all of the conflicts for anyone who wants to take a stab at it.
2021-02-27 05:18:36 -05:00
Sally Coolatta
d63b428565 Merge Kart-Public next 2021-02-27 02:16:21 -05:00
LJ Sonic
c5f8454093 Fix consoleplayer returning the server player during joining phase 2021-02-11 00:10:15 +01:00
Sally Coolatta
d627da7510 Fix lap executors not happening, and also edit it so they act like Each Time rather than Once
Allows for simplified executor logic on Desert Palace and Chrome Gadget, possibly Egg Zeppelin too
2021-02-01 14:34:48 -05:00
James R
a4ea83b1dc Invalidate taglist userdata 2020-12-05 02:26:00 -08:00
James R
775cb46f75 Lua taglib for accessing taggroups
The global "tags" can be iterated upon for every unique tag which is set in the
level. If a tag is set on a sector/line/thing, it will be included. Taking the
length of "tags" will give you the number of these unique tags. (If a tag is
set on multiple sectors/lines/things, it will only be counted once though.)

For sectors, lines and mapthings, call the field "tagged". This function takes
one argument, which is the tag. The return value can be iterated over for all
the sectors/lines/things with that tag. The length can also be taken for the
number of such objects. If no argument is given, the global tag is default.
2020-12-04 00:30:08 -08:00
LJ Sonic
079df8df4d Merge branch 'fix-stacktrace' of https://git.do.srb2.org/STJr/SRB2.git into next
# Conflicts:
#	src/dehacked.c
#	src/dehacked.h
2020-11-29 21:54:15 +01:00
Nev3r
17955311b9 Merge branch 'dehacked-hell' into 'next'
Split dehacked.c into multiple files.

See merge request STJr/SRB2!1222
2020-11-29 05:18:45 -05:00
James R
fe031088ae Lua: "defrosting" global to tell how many tics are processing in the preticker 2020-11-24 19:32:01 -08:00
GoldenTails
d673604b48 Split dehacked.c into multiple files. 2020-11-23 21:42:26 -06:00
GoldenTails
8a9c3c57f7 Fix a dumb typo of luaL_checklstring i made whoops 2020-11-23 21:20:17 -06:00
James R
85bf84193d Merge branch 'make-some-lua-globals-rw' into 'next'
Make several Lua global variables writable.

See merge request STJr/SRB2!1233
2020-11-22 18:47:53 -05:00
Louis-Antoine
ff7ca5450f Only call the Lua API for overridden actions 2020-11-15 01:15:58 +01:00
Louis-Antoine
05ae84bd09 Fix Lua stacktrace not showing in various situations 2020-11-13 19:12:25 +01:00
Louis-Antoine
4938015253 Replace lua_pop(-1) with lua_settop(0) 2020-11-13 15:31:11 +01:00
Sally Coolatta
fc934b38e1 Merge public next 2020-11-10 15:32:48 -05:00
James R
a247719adf Merge branch 'register-metatables' into 'next'
Improve support for metatables in netgames

See merge request STJr/SRB2!1224
2020-11-08 19:30:51 -05:00
Louis-Antoine
88408619aa Show a console error if the gamestate contains too many tables 2020-11-08 17:33:49 +01:00
James R
745b293c47 Always allow access to the serverplayer 2020-11-05 20:00:21 -08:00
GoldenTails
6126e8badf Make mapmusflags and mapmusname writable. 2020-11-05 18:12:35 -06:00
GoldenTails
fbd20c9591 Make skincolor_* CTF color variables writable. 2020-11-05 17:38:32 -06:00
GoldenTails
cf3d6eb0af Make stoppedclock writable. 2020-11-05 15:22:45 -06:00
GoldenTails
3125128be7 Make displayplayer writable. 2020-11-05 13:43:33 -06:00