PF_SPINDOWN is inaccurately applied
addHook("PlayerThink", function(p)
if (p.cmd.buttons & BT_JUMP) and not (p.pflags & PF_JUMPDOWN)
print("JUMP")
end
if (p.cmd.buttons & BT_SPIN) and not (p.pflags & PF_SPINDOWN)
print("SPIN")
end
end)
This script is supposed to print JUMP
when Jump is pressed and has not been pressed in the previous frame, and analogously, SPIN
when Spin is pressed and has not been pressed in the previous frame. However, only the first one will ever be fulfilled, since for some reason PF_SPINDOWN
manages to activate in the same frame as a first BT_SPIN
press.
This is of course assuming both of those player flags are supposed to represent a button having been pressed in the previous frame - nevertheless, there lies an inaccuracy somewhere in this behavior which I think warrants fixing.