Commit graph

12348 commits

Author SHA1 Message Date
Steel Titanium
7cd41a8eb7 Compile with -rdynamic on UNIXCOMMON platforms 2021-04-26 03:48:38 -04: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
James R
c51c478740 Lua: ensure order of MIN, MAX possible values
Cvars could now have a range (MIN, MAX) plus some preset
values, but Lua could not take advantage of this due to
table order not being guaranteed.
2021-04-25 21:51:24 -07:00
Sally Coolatta
4bafd62271 Only return skin string number if it existed 2021-04-25 18:44:07 -04:00
Sally Coolatta
92107f28d5 Add string variable for unlockables and emblems
Skin unlockables / skin emblems are now checked at runtime to see if there's any matches.
2021-04-25 17:54:47 -04:00
Sally Coolatta
f0b9e0e415 Default to first usable skin instead of 0, I_Error if none are usable 2021-04-25 16:38:33 -04:00
LJ Sonic
d18fc8882f Merge branch 'dont-load-dont-unload' into 'next'
Fix a dedicated crash in Special Stage intermissions (2.2.9 RC1)

See merge request STJr/SRB2!1475
2021-04-25 16:35:46 -04:00
LJ Sonic
1d07fc2de3 Merge branch 'spritedef-add-hotfix' into 'next'
Spritedef add hotfix

See merge request STJr/SRB2!1476
2021-04-25 16:34:39 -04:00
LJ Sonic
1e394a80bf Merge branch 'possible-netgame-quit-crash-hotfix' into 'next'
Possible netgame quit crash hotfix

Closes #487

See merge request STJr/SRB2!1477
2021-04-25 16:33:49 -04:00
Sally Coolatta
382c0aa7de Fix overshadowed declaration 2021-04-25 16:27:15 -04: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
LJ Sonic
02ee480abe Merge branch 'gl-colormapped-epolyflag' into 'next'
Fix uninitialized reads in PreparePolygon

See merge request STJr/SRB2!1392
2021-04-25 14:19:24 -04:00
sphere
a90642bfa9 Merge branch 'ogl-midtexture-zfighting-fix' into 'next'
Render midtextures on two-sided lines with a z-buffer offset

See merge request STJr/SRB2!1376
2021-04-25 14:02:02 -04:00
Monster Iestyn
65624bf6c0 Change numadded counter to UINT16 instead of UINT8, to allow for more sprites properly 2021-04-25 19:01:51 +01:00
Tatsuru
376d6cd6a2 Don't try to free patches in dedicated 2021-04-25 14:26:43 -03:00
Sally Coolatta
8278e621fb Removed skin->availability
Locked skins now are a specific unlockable type, instead of being tied to the skin's properties.

This has plagued custom gamedata since 2.2 launch. It's extremely obnoxious having to set aside random numbers as dummy unlockables just to ensure that Amy Fang & Metal are unlocked from the start in a custom map pack.

Other changes made to accommodate this:
 - R_GetSkinAvailabilities is now created from the list of unlockables set to skin type. (1st skin unlockable defined is (1), 2nd skin unlockable defined is (1 << 1), etc...)
- The "Added skin x" print shows up when loading addons but not at all for the base game, because the previous behavior of hiding based on if the skin was locked would now require iterating unlockables, which felt wrong to do during that stage of the loading process
 - I noticed in my test wad that Sonic&Tails would give you Sonic&Sonic out if Tails was locked. I fixed that by making both skins required to show the character select option.

Mods that reserved empty dummy unlockables for Amy Fang and Metal won't have to do anything. Mods that wanted to re-lock them behind different requirements will have to update, but in the future they will not have to be in specific slots. Additionally, now Sonic Tails and Knuckles can also be locked for mods.
2021-04-25 07:18:32 -04:00
Zwip-Zwap Zapony
acff5c1ada Merge branch 'next' into drawcroppedpatch-improvements 2021-04-25 10:15:16 +02:00
Radicalicious
e510e71617 Remove fire shield flash 2021-04-23 15:50:48 -04:00
Tatsuru
4f2f94d02d Compatibility with the current identifier 2021-04-21 22:22:37 -03:00
Tatsuru
da56e84d2c Change TOL_ERZ3 identifier 2021-04-21 22:17:16 -03:00
Sally Coolatta
57d81ddb21 Kart cmd->latency port
Nev3r was talking about something that would've been drastically improved with this, and it is really simple, so I ported it :)
2021-04-21 19:58:14 -04:00
GoldenTails
e7156db79d Allow Lua to draw level title strings, and get the width and height of what would be drawn 2021-04-20 23:52:25 -05:00
GoldenTails
43c21edcbd Send IntermissionThinker and intermission hud hooks stagefailed. 2021-04-20 23:52:25 -05:00
GoldenTails
aa54a04c9e Allow Lua to stop the intermission level title strings from drawing 2021-04-20 23:52:25 -05:00
GoldenTails
6c4e7e13e0 Allow Lua to disable the emeralds that appear in the Special Stage intermission. 2021-04-20 23:52:25 -05:00
Sally Coolatta
ce3c5e081e Missed a few lines in the prev commit 2021-04-20 22:19:56 -04:00
Sally Coolatta
8f01e85ade Allow spaces in captions defined in SOC 2021-04-20 22:10:11 -04:00
Jaime Ita Passos
77b8578d04 Add ease Lua library 2021-04-19 21:42:00 -03:00
Sally Coolatta
41f492f2f9 Don't award any potentially cheesable bonuses if the stage was failed.
Time Bonus is 0'd out if the stage was failed, since you can defeat the whole point of it if the stage lets you fail it immediately. Same with Guard Bonus -- it's not really a no-hit run if you didn't interact with anything.

Kept others that are more effort-based like Ring Bonus to give the player a little bit of partial credit, especially since Special Stages do this too.
2021-04-19 17:59:55 -04:00
Sally Coolatta
30e7455178 Failing a stage just displays the level title 2021-04-19 17:50:49 -04:00
Sally Coolatta
d8d3dee46f Add linedef executor for toggling stagefailed
By default, the executor will fail the stage. If Not Climbable is checked, the stage can be completed normally again.
2021-04-19 17:20:34 -04:00
Jaime Ita Passos
b026a6991c Easing functions 2021-04-19 15:52:07 -03:00
sphere
d71b99a56b Merge branch 'comparepolygons-fix' into 'next'
Remove bad pointer arithmetic in polygon comparators (fixes #295)

Closes #295

See merge request STJr/SRB2!1462
2021-04-19 14:33:41 -04:00
sphere
164fbeff91 Merge branch 'fix-perfstats-3' into 'next'
Fix incorrect values caused by outdated use of timing functions in perfstats 3

See merge request STJr/SRB2!1460
2021-04-19 14:33:31 -04:00
sphere
194d0b8201 Merge branch 'interfission' into 'next'
Cache teamflags/icons before drawing if they don't exist yet (closes #511)

Closes #511

See merge request STJr/SRB2!1459
2021-04-19 14:33:23 -04:00
sphere
315582bd6c Merge branch 'fix-blendtables' into 'next'
Fix blend tables generation

See merge request STJr/SRB2!1458
2021-04-19 14:33:12 -04:00
sphere
d871612a72 Merge branch 'openglol' into 'next'
Fix HWR_DrawSprite sigsegv

See merge request STJr/SRB2!1454
2021-04-19 14:33:03 -04:00
Sally Coolatta
d59f25a6cd stagefailed is more useful
- Can now apply to normal stages, simply defaults to "false" in normal stages.
- Post-level cutscenes are now always skipped when the stage was failed.
- Exposed the boolean as a Lua read+write global.

Desired for SUGOI, as it allows for visited flags not be updated, and level completion emblems to not be awarded. Which means a lot less crappy non-ideal workarounds.

Normal stage intermission currently does not reflect failure state at all. Maybe it could always skip, never award score bonuses, have different text... etc. Probably would leave that up to vanilla dev opinion.
2021-04-18 12:59:49 -04:00
Hannu Hanhi
ee578b68f4 Remove bad pointer arithmetic in polygon comparators, that was causing glitches 2021-04-17 03:11:29 +03:00
Hannu Hanhi
3670af5a31 Fix incorrect values caused by outdated use of timing functions in perfstats 3 2021-04-16 00:38:34 +03:00
katsy
7b83345c75 need to create the patches here if they don't already exist 2021-04-14 19:29:53 -05:00
Jaime Ita Passos
d5e9005dd0 Fix NPOT flats, other minor changes. 2021-04-14 11:34:36 -03:00
Jaime Ita Passos
b3d7df74c0 This is my attempted fix for texture rotation on slopes, in Software. 2021-04-14 10:55:52 -03:00
Jaime Ita Passos
0d4d2ed6d8 Fix blend tables generation 2021-04-13 12:11:31 -03:00
katsy
23759c67aa move HWR_GetMappedPatch earlier 2021-04-12 21:26:29 -05:00
X.organic
6f0b4a4f6d
Remove some dead code from DEH_LoadDehackedFile
Also fixes a buffer overflow, but said overflow generally got caught by
the stack smashing protector. Still, it's better for SOC files not to be
able to crash the game that easily.
2021-04-12 19:09:21 +02:00
X.organic
f0f3b33d71
Edit note_size alias to get rid of warnings 2021-04-12 19:09:21 +02:00
X.organic
701c6c8968
Fix myhashfgets-related buffer overflows in deh_soc.c 2021-04-12 19:09:12 +02:00
GoldenTails
8f322fd86f name kinda sucked 2021-04-11 18:33:11 -05:00