SRB2 Message Board

SRB2 Message Board (https://mb.srb2.org/index.php)
-   Bug Report Archive (https://mb.srb2.org/forumdisplay.php?f=124)
-   -   Lua cannot access MFE_TOUCHLAVA (https://mb.srb2.org/showthread.php?t=46049)

Katmint 12-28-2019 11:46 PM

Lua cannot access MFE_TOUCHLAVA
 
I've provided a sample script that's intended to kill the player when touching lava to ensure the fault is not on my end.
Code:

addHook("MobjThinker", function(lava)
    if (lava.player)
    and (lava.player.mo.eflags & MFE_TOUCHLAVA)
        P_KillMobj(lava, lava, lava)
    end
end, MT_PLAYER)

If you change MFE_TOUCHLAVA to MFE_TOUCHWATER in the above script, it will kill the player on water contact. Currently it will error on map load since MFE_TOUCHLAVA is nil.

Monster Iestyn 12-30-2019 11:42 AM

It turns out that MFE_TOUCHLAVA being missing from the list of recognised MFE_ flags also resulted in MFE_PUSHED, MFE_SPRUNG and MFE_APPLYPMOMZ getting the wrong values in SOC/Lua. In addition, MFE_TRACERANGLE was also missing from the list.

A fix has been made for all of these bugs for 2.2.1.


All times are GMT. The time now is 05:15 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.