1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Initial Gamepad support

Adds initial ingame gamepad support to minetest.

Full Formspec support is not implemented yet and
can be added by a later change.
This commit is contained in:
est31 2016-05-27 08:35:07 +02:00
parent 1e86c89f36
commit 2060fd9cbe
17 changed files with 577 additions and 80 deletions

View file

@ -1056,7 +1056,9 @@ void GenericCAO::step(float dtime, ClientEnvironment *env)
PlayerControl controls = player->getPlayerControl();
bool walking = false;
if(controls.up || controls.down || controls.left || controls.right)
if (controls.up || controls.down || controls.left || controls.right ||
controls.forw_move_joystick_axis != 0.f ||
controls.sidew_move_joystick_axis != 0.f)
walking = true;
f32 new_speed = player->local_animation_speed;