Nami
a36920808b
Revert changes to searchBlockmap because on reflection, the benefits didn't outweigh breaking every current usage of it
...
Readd ThinkFrame in its original position
PostThinkFrame now runs at the end of P_Ticker, only MapEnd runs after it
2019-12-30 19:04:27 -08:00
Nami
58dd578b09
Let's try this again!
2019-12-29 20:36:24 -08:00
Alam Ed Arias
61a0197339
Merge branch 'next' into gametype-clownery
2019-12-26 14:48:04 -05:00
Monster Iestyn
5241030012
Fix ShouldDamage, MobjDamage and MobjDeath hooks all messing up the pushing of variables to Lua as function args, by adding damagetype support where it was missing!
...
The above issue occured only if you had both a generic hook and a type specific hook for a particular hook type. This way, the stack is never updated to include damagetype at the start, and all pushes of the variables get offsetted by 1 compared to what they should be, once the code *expects* damagetype to be included in it.
2019-12-25 21:48:59 +00:00
Jaime Passos
a657392d39
ViewpointSwitch improvements.
2019-12-23 20:22:57 -03:00
Jaime Passos
00440224d2
De-fuck team change
2019-12-19 00:31:13 -03:00
Jaime Passos
5da55e8b76
Shadowed variable declarations whoopsie!!! uwu
2019-12-18 23:53:26 -03:00
Jaime Passos
6f857df5e5
ViewpointSwitch hack so nobody does anything evil
...
Prints the generic "can't do this in a HUD hook" message. Whatever. I'm tired.
2019-12-18 23:47:17 -03:00
Jaime Passos
be5fd1a0db
TeamSwitch hook for Lua
2019-12-18 23:40:58 -03:00
Jaime Passos
0421c81e04
ViewpointSwitch hook for Lua
2019-12-18 20:43:54 -03:00
Steel Titanium
d415cd5c6d
Update copyright date on source files
2019-12-06 13:49:42 -05:00
Steel Titanium
597949f370
Change this for consistency.
2019-10-14 21:47:20 -04:00
Steel Titanium
0f79396757
New intermission thinker hook
2019-10-13 20:50:46 -04:00
toaster
3eb9b85fd4
"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
28dfeb344b
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
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
Nev3r
caaacf3f76
Fixed the shield spawn/special hook cases on the hook add switch.
...
They basically work now.
Signed-off-by: Nev3r <apophycens@gmail.com>
2018-12-24 17:31:00 +01:00
Latapostrophe
c7060aa5ad
Remove mute boolean from playermsg hook, fix username stuff still being there, potential memory leaks, and added back the ip message.
2018-12-22 16:44:58 +01:00
Latapostrophe
45aba493c7
2.1.21 and all of the kart additions. Woo.
2018-12-17 20:43:59 +01:00
Jimita
6d7689c1a7
Merge branch 'next' into lua_mapchange
2018-11-30 15:10:59 -02:00
MPC
54cae84849
Change MapChange so Lua returns the map number you change
2018-11-30 14:01:40 -03: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
896de73c60
....ow this slipup hurt me badly
2018-11-10 16:00:33 +00:00
Monster Iestyn
268bde3fdf
Merge branch 'public_next'
...
# Conflicts:
# src/d_netcmd.c
# src/d_netcmd.h
# src/dehacked.c
# src/g_game.h
# src/hardware/hw_draw.c
# src/hardware/hw_main.c
# src/lua_baselib.c
# src/lua_hook.h
# src/lua_hooklib.c
# src/lua_hudlib.c
# src/lua_libs.h
# src/lua_maplib.c
# src/lua_script.c
# src/m_misc.h
# src/p_mobj.c
# src/s_sound.c
# src/sdl12/mixer_sound.c
# src/w_wad.c
2018-11-10 15:41:57 +00:00
Monster Iestyn
d8f3a20e65
Merge branch 'Playerquit_hook' into 'next'
...
"PlayerQuit" Lua Hook
See merge request STJr/SRB2!127
2018-11-08 15:53:35 -05:00
Monster Iestyn
61176ee736
Merge branch 'public_next'
...
# Conflicts:
# src/doomdef.h
# src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj
# src/win32/win_vid.c
2018-01-02 17:32:24 +00:00
Monster Iestyn
c7cd64583d
Added a bunch of I_Asserts to lua_hooklib.c relating to mobj types just in case
2017-12-17 20:59:24 +00:00
toasterbabe
844416855f
Smiles follow-mobj initial support! Still using a Lua hook to follow closely behind, but now it doesn't need to be a generic thinkframe. Woo!
2017-10-02 14:08:58 +01:00
Monster Iestyn
0dd15ed8a4
Merge branch 'master' into lua-lump-load-only
2017-07-09 15:06:15 +01: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
a6f830ddff
Add the "MapThingSpawn" hook to Lua
2017-04-15 21:41:22 +01:00
Monster Iestyn
e3ded1671c
Added MobjMoveBlocked Lua hook
...
Also slightly edited P_XYMovement to properly check the mobj still exists before checking its eflags for MFE_SPRUNG, while I was at it
2017-01-21 23:49:18 +00:00
Inuyasha
37c8ef6369
Merge branch 'public_next' of http://git.magicalgirl.moe/STJr/SRB2Internal
2016-12-22 17:46:39 -08:00
Louis-Antoine
db20bfb3c3
Generic mobj hooks are now run before mobjtype-specific mobj hooks, and player/linedef executor hooks now have their own lists
2016-12-15 21:05:54 +01:00
Prisima the Fox
dd13df2308
Whoops, didn't see the duplicate line.
2016-12-03 18:18:16 -05:00
Prisima the Fox
d788cb7676
Keeping the lua_gettop(gL) thing, otherwise the player/reason values will be pushed once to the stack each for every hook. Thanks MonsterIestyn!
2016-11-25 15:20:41 -05:00
toasterbabe
85fb02aaf6
Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into shield-actions
...
# Conflicts:
# src/p_inter.c
# src/p_user.c
# src/st_stuff.c
2016-11-20 16:44:38 +00:00
Prisima the Fox
b1ce5896aa
Remove boolean remnants
2016-11-08 10:30:01 -05:00
Louis-Antoine
6f4699fb77
MobjThinker, MobjCollide and MobjMoveCollide hooks are now directly linked to the mobjtype they belong to, so you no longer iterate through all existing hooks.
2016-11-04 18:56:25 +01:00
toasterbabe
0ee2937392
Adding ShieldSpecial hook. (Activates under different circumstances to the JumpSpinSpecial hook, and can be used to cancel existing shield actions.)
2016-10-24 13:52:52 +01:00
Prisima the Fox
defc7c1645
Oops; PlayerQuit isn't a boolean!
2016-10-20 23:26:41 -04:00
Prisima the Fox
cfb2feff8e
"PlayerQuit" hook
2016-10-20 22:25:11 -04:00
toasterbabe
59fccab8e5
Restructured things so nojumpdamage characters can use the elemental, bubblewrap and attract shields.
2016-10-20 20:55:15 +01:00
Monster Iestyn
ea65e9e54f
Add "damagetype" argument to functions for Lua hooks ShouldDamage, MobjDamage, MobjDeath and HurtMsg
2016-07-20 22:02:02 +01:00
Inuyasha
f07585191b
copyright dates/statements updated and such
...
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn
4302cfaa00
Merge branch 'playerspawn-hook' into 'next'
...
Add PlayerSpawn hook to Lua
I don't know how I did this but I did. Something about staring at code from 3AM till 5AM...
Here's a test script too:
```Lua
addHook("PlayerSpawn", function(player) player.health = 99 end)
```
See merge request !48
2016-03-04 10:19:18 -05:00
Yukita Mayako
b368936b03
Fix bad logic in LUAh_NetArchiveHook rewrite...
...
Argh, I knew I was forgetting something! archFunc is the argument to be passed to the hooks, not tables!
2016-03-03 17:30:46 -05:00
Yukita Mayako
9d6e75ae4f
Cleanup LUAh_NetArchiveHook prototype mess.
2016-03-03 17:30:10 -05:00
Yukita Mayako
0bdc976d50
Shut up compiler warning.
2016-03-03 17:19:35 -05:00