Skip to content

A few Lua input improvements

LJ Sonic requested to merge lua-input-improvements into next

This adds and exposes the new global variable input.ignoregameinputs (name suggestions are welcome) to Lua. When enabled, this variable will prevent all keyboard/mouse/gamepad/etc inputs from affecting the gameplay (jumping, moving camera, etc).

Its most obvious usage is creating custom clientside menus using the input library without the camera jiggling or your character moving around as you navigate through the menus, and without relying on whacky hacks to get it working.

The mouse, mouse2 and gamekeydown global variables have also been moved to the input namespace where they belong. For the sake of backward-compatibility, they will still remain available from the global namespace until the next major patch.

It also refactors a lot of Lua C API calls.

Merge request reports

Loading