diff options
Diffstat (limited to 'src/client/input.cc')
-rw-r--r-- | src/client/input.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/input.cc b/src/client/input.cc index 9053725..e8dacd6 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -101,7 +101,7 @@ void frame(float seconds) switch (event.type) { case SDL_KEYUP: - if (!console::visible() && core::application()->connected() && core::Player::local.control) + if (!console::visible() && core::application()->connected() && core::game()->localplayer()->control) // send key events to the game world keyreleased(event.key.keysym); break; @@ -111,7 +111,7 @@ void frame(float seconds) } else if (console::visible()) { // send key events to the console console::keypressed(event.key.keysym); - } else if (core::application()->connected() && core::Player::local.control) { + } else if (core::application()->connected() && core::game()->localplayer()->control) { // send key events to the game world keypressed(event.key.keysym); } @@ -123,9 +123,9 @@ void frame(float seconds) } - if (!console::visible() && core::application()->connected() && core::Player::local.control) { - core::Player::local.control->set_thrust(local_thrust); - core::Player::local.control->set_direction(math::degrees360f(core::Player::local.control->direction() + local_turn_offset)); + if (!console::visible() && core::application()->connected() && core::game()->localplayer()->control) { + core::game()->localplayer()->control->set_thrust(local_thrust); + core::game()->localplayer()->control->set_direction(math::degrees360f(core::game()->localplayer()->control->direction() + local_turn_offset)); } } |