Commit graph

6030 commits

Author SHA1 Message Date
toaster
6f1128c84d "PlayerCanDamage" hook!
* Takes function(player, mo) input.
* Return TRUE for stating that yes, the player is in a state that can cause contact damage, do with that what you will.
* Return FALSE for stating that no, the player is weak and vulnerable and cannot cause contact damage, do with that what you will.
* Return NIL for allowing the function to continue regular operation.

Fills a different ideological niche than ShouldDamage - that's for determining whether damage dished between two objects should happen, this is for determining which way around damage should be dished when considering a player-object interaction.

Or, in other words, think of it as "ShouldDamage is whether damage that has been requested should be granted, for object-object interaction, while PlayerCanDamage is for whether global player properties should cause damage to enemies and monitors in the first place, like spinning, hammering or stomping."
2019-06-19 12:55:05 +01:00
toaster
4fffceeaba Instead of only performing a hook if the Lua Hook loop determines its type to be the one we want, actively continue through the loop if it's NOT. This optimisation was performed while preparing the following commit; I have generously split them out for less shitty commit-by-commit review. 2019-06-19 12:28:57 +01:00
toaster
a6fd2275dd P_PlayerCanDamage(player_t*, mobj_t*), ported from the abandoned project_birthday because GOD the code looks awful with those huge monolith conditions in it. Available to Lua.
(Also, minor fixes to lib_pSpawnLockOn, and removing the SH_OP fuckery.)
2019-06-19 12:09:02 +01:00
MascaraSnake
3fcf2a19d2 Some more minecart fixes 2019-06-19 00:10:28 +02:00
toaster
597d56d151 Do some minor HUD fixes.
* Move HUD text's anchoring to underneath STR instead of above Lives.
* Adjust chat position slightly, to take advantage of SRB2's HUD layout having less content towards the bottom (unlike Kart, where it has roughly equal).
* Fix Match emeralds not displaying while in tab rankings with all-seven invuln/shoes bonus active.
2019-06-18 18:51:24 +01:00
MascaraSnake
0329b57e43 Fixed the Canarivore gas slowdown being much too weak 2019-06-18 19:29:53 +02:00
MascaraSnake
456efdfa38 ... 2019-06-18 19:06:05 +02:00
toaster
b745b4fe1b With permission from Kart Krew (Sal and Sryder specifically - they don't know WHY vanilla's using it):
* Port across the additional colour translation maps, including mobj-level support for "colorized" objects.
* Make Fangboss and both Metal Sonic objects greyscale if, on spawn, there is a player in the game who is not a spectator whose skin is that character.
* Allow bosses with MF_GRENADEBOUNCE to opt out of the MF2_FRET colour-flashing tomfoolery, and give this flag to Fang.
2019-06-18 17:55:57 +01:00
toaster
a334db7f44 Support backspace for resetting various menu values, just like Kart. 2019-06-18 14:36:06 +01:00
toaster
229cdf0e84 Improve rain/weather.
* Like Kart, remove cv_precipdensity.
* Like Kart, replace "Infinite" draw distance value with "None".
* Better thinker with more return optimisation.
* Better placement of thinking in rendering, to avoid ceiling-mounted sprite glitches.
2019-06-18 14:22:10 +01:00
Monster Iestyn
d1901a2030 fix type mismatch by typecasting 2019-06-17 20:54:06 +01:00
MascaraSnake
faa43ea92d Merge branch 'master' into new-acz-minecarts 2019-06-17 20:43:21 +02:00
Monster Iestyn
4b5457ea74 Part 2 of fix, make sure copied slopes also pass on hasslope status to attached target sectors for FOFs
Also fix whitespace to use tab-style spaces instead of regular spaces, ew
2019-06-17 19:00:04 +01:00
Monster Iestyn
6dd39fa83b Fix FOF slopes briefly glitching on level load in software mode, by ensuring the FOFs' target sectors have hasslope set on creation 2019-06-17 18:46:51 +01:00
MascaraSnake
6faaa1559d Adjusted the height difference for track switching 2019-06-17 08:41:51 +02:00
MascaraSnake
265350d527 Minecart stopper itself also needs MF_NOCLIPHEIGHT and MF_NOGRAVITY 2019-06-16 22:26:52 +02:00
MascaraSnake
4c3228ebeb Repaired the height difference check during track switching 2019-06-16 22:00:50 +02:00
MascaraSnake
c9a8505abc Fixed a bug with the Canarivore gas 2019-06-16 21:36:22 +02:00
MascaraSnake
85e7f4b2af Fixed a sound bug 2019-06-16 19:08:20 +02:00
MascaraSnake
50cade33ab Fixed the cacti heights 2019-06-16 18:14:15 +02:00
MascaraSnake
457f1df181 Finetuned the saloon door swinging 2019-06-16 17:57:03 +02:00
MascaraSnake
bdccfb9c35 (Hopefully) fixed the player sometimes landing on the solid part of the minecart stopper after being launched out of the minecart 2019-06-16 17:07:13 +02:00
MascaraSnake
64b63edfdd Added minecart support to A_MixUp 2019-06-16 16:49:18 +02:00
MascaraSnake
f272a29a8d Fixed a bug involving players being thrown out of minecarts 2019-06-16 16:39:06 +02:00
MascaraSnake
3dc4e1d950 Snapper head/legs and minecart segments flash when they're destroyed 2019-06-16 15:35:32 +02:00
MascaraSnake
f1eebf270d Do death animation even when MF2_DONTDRAW is set 2019-06-15 22:29:30 +02:00
MascaraSnake
70882dc9d8 Don't jump repeatedly when holding jump 2019-06-15 21:58:58 +02:00
MascaraSnake
bfe3deb5d6 Streamlined the minecart death handling 2019-06-15 21:43:36 +02:00
MascaraSnake
efc1b7ef2b Kill minecarts that fall into death pits 2019-06-15 20:59:56 +02:00
MascaraSnake
852ae2d07b Many more bugfixes 2019-06-15 20:21:18 +02:00
MascaraSnake
4d27dac35a Simplified the setup for the Snapper/minecart death animations 2019-06-15 17:33:07 +02:00
MascaraSnake
ac692e2cdd Fixed minecart not exploding on death 2019-06-15 14:21:27 +02:00
MascaraSnake
18c0d32320 Removed an unnecessary tracer check 2019-06-15 13:52:27 +02:00
MascaraSnake
75afe898f3 You can now jump onto tracks that are running antiparallel to yours 2019-06-15 13:49:30 +02:00
MascaraSnake
e74447b0d3 Some more bugfixes 2019-06-15 00:59:13 +02:00
MascaraSnake
73554c09dd Another bugfix 2019-06-15 00:12:58 +02:00
MascaraSnake
e0dea69237 A bunch of bugfixes 2019-06-15 00:04:50 +02:00
MascaraSnake
18bd29c904 "Finished" minecart hardcoding (still untested and buggy) 2019-06-14 21:19:52 +02:00
Jaime Passos
cf7b9ccff4 Update m_misc.c 2019-06-14 14:13:41 -03:00
MascaraSnake
fd39f4ce1e Merge branch 'acz-hardcode' into new-acz-minecarts 2019-06-13 21:52:08 +02:00
MascaraSnake
cadcc642c0 Set tracers via P_SetTarget and not directly 2019-06-13 21:51:31 +02:00
MascaraSnake
720d84f87f More incomplete minecart hardcoding 2019-06-13 21:45:30 +02:00
MascaraSnake
af024f9f53 Merge branch 'acz-hardcode' into new-acz-minecarts 2019-06-12 21:28:39 +02:00
MascaraSnake
1b491f2496 Forgot to hardcode the mobj.valid checks 2019-06-12 21:28:09 +02:00
MascaraSnake
01adbfc495 Hardcoded the saloon door 2019-06-12 21:20:14 +02:00
Steel Titanium
6c1518c1dc Merge remote-tracking branch 'remotes/origin/master' into levelselect-tweaks 2019-06-11 20:06:02 -04:00
Steel Titanium
8e5593c207 Merge branch 'public-musicplus-libopenmpt' of https://git.magicalgirl.moe/STJr/SRB2 into public_libopenmpt
# Conflicts:
#	.travis.yml
#	src/m_menu.c
#	src/sdl/Srb2SDL-vc10.vcxproj
#	src/sdl/Srb2SDL.props
2019-06-11 17:48:00 -04:00
Nev3r
0c3f273745 Properly take skybox viewpoint angle into account. 2019-06-11 14:47:58 +02:00
toaster
81a07293e6 Fix Titlemap with mazmazz's fancy menu stuff
Handled by changing some defaults.

Untested, experimenting with Gitlab Web IDE as reconfiguring my build environment is likely to be a pain and I'd like to put that off as long as possible please
2019-06-10 15:43:47 -04:00
MascaraSnake
ff6c8063af Fixed some angle business in the BASH code 2019-06-10 20:40:12 +02:00