Goldenhog
Wandering Protagonist
Code:
addHook("ShouldDamage", function(mo,inf,src)
if (inf or src)
or P_PlayerTouchingSectorSpecial(mo.player,1,1)
or P_PlayerTouchingSectorSpecial(mo.player,1,2)
or P_PlayerTouchingSectorSpecial(mo.player,1,3)
or P_PlayerTouchingSectorSpecial(mo.player,1,4)
or P_PlayerTouchingSectorSpecial(mo.player,1,5)
return false
end
end, MT_PLAYER)
This is the code I have. It's meant to make the player invulnerable to contact damage, projectiles and non-instakill damage sectors. It works, except when it comes to linedefs. For some reason, standing on lava functions fine but touching a lavafall or walking off of a lava FOF results in damage. Same with spike sectors (i know these are not to be used anymore i was just using an old map for testing) - standing on them works, walking off of them results in damage. Same with THZ's electric floors, etc.