Player can get squished before Lua code is run

Status
Not open for further replies.
Just for fun, I tried to make the player object very non-tall to see if I could run under tight spaces this way. Didn't quite go as planned. [GfyCat link]
If the space is so small a player will automatically spin, the player will spin regardless of the player height set in Lua (or die if the skin doesn't have CA2_Spin as secondability).
If the space is small enough to squish even a spinning player, the player will instantly die from walking under it, also regardless of Lua player height stuff.

From what I understand, the player code sets the height of the player object every tic to either this or that value depending on whether the player is spinning or not, and then checks "is this space too tight to fit in" to either auto-spin or kill the player before Lua is run. In my opinion, if possible, it could be better if the auto-spin and squish code is run after Lua. Whether this is even something that's do-able (without being really hard to do), I don't know, but I certainly hope it is. If it's intentional... I don't see why, but I guess it's okay.

Test Lua script I used:
Code:
addHook("MobjThinker",function(mobj)
    mobj.height=2*FRACUNIT
end,MT_PLAYER)
 
Last time I tried, modifying the player's height doesn't actually change anything at all. I had to scale the player down and use 2 times bigger scaled sprites.
 
Last time I tried, modifying the player's height doesn't actually change anything at all.
If you see the GfyCat link, you'll see I managed to walk right under the "spin" gap thing in Green Flower Zone 1 (causing auto-spin, as my bug report says) and also the little fence a bit further ahead (causing instant death, as my bug report also says).

Edit: If you only changed the height at one tic, that won't work. It has to continiously be set every tic to work "properly"... and even then the "properly" I'm talking of isn't completely proper, thus why I made this bug report.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top