mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
hooklib: move HurtMsg to mobj hooks
Fixes regression of mobj type discriminator not working
for this hook.
blame 8d382e49fb
This commit is contained in:
parent
a895a5c374
commit
fbcdaa6f4d
2 changed files with 2 additions and 2 deletions
|
@ -41,6 +41,7 @@ automatically.
|
|||
X (MobjMoveBlocked),/* P_XYMovement (when movement is blocked) */\
|
||||
X (MapThingSpawn),/* P_SpawnMapThing */\
|
||||
X (FollowMobj),/* P_PlayerAfterThink Smiles mobj-following */\
|
||||
X (HurtMsg),/* imhurttin */\
|
||||
|
||||
#define HOOK_LIST(X) \
|
||||
X (NetVars),/* add to archive table (netsave) */\
|
||||
|
@ -56,7 +57,6 @@ automatically.
|
|||
X (JumpSpinSpecial),/* P_DoJumpStuff (Spin button effect (mid-air)) */\
|
||||
X (BotTiccmd),/* B_BuildTiccmd */\
|
||||
X (PlayerMsg),/* chat messages */\
|
||||
X (HurtMsg),/* imhurttin */\
|
||||
X (PlayerSpawn),/* G_SpawnPlayer */\
|
||||
X (ShieldSpawn),/* P_SpawnShieldOrb */\
|
||||
X (ShieldSpecial),/* shield abilities */\
|
||||
|
|
|
@ -933,7 +933,7 @@ int LUA_HookPlayerMsg(int source, int target, int flags, char *msg)
|
|||
int LUA_HookHurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source, UINT8 damagetype)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_hook(&hook, false, HOOK(HurtMsg)))
|
||||
if (prepare_mobj_hook(&hook, false, MOBJ_HOOK(HurtMsg), inflictor))
|
||||
{
|
||||
LUA_PushUserdata(gL, player, META_PLAYER);
|
||||
LUA_PushUserdata(gL, inflictor, META_MOBJ);
|
||||
|
|
Loading…
Reference in a new issue