Zwip-Zwap Zapony
Member
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:
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)