Add PlayerHitFloor hook (fixed)
Adds a hook that executes whenever the player hits the ground. Returns whether to reset vertical momentum upon landing (I think). Returning nil
does not override the original function
As for the original MR, !1796 (closed), its project was deleted, so I could not reopen it and commit the fixes. Another thing is that the hook would always return true
because LUA_HookPlayer
was used to call it instead of a function specific to it. A bit of an oversight on my part...
The example script below removes Knuckles' glide sliding and landing, almost like 2.1 Knuckles