diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-18 20:08:37 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-18 20:08:37 +0000 |
commit | 7daaf66869b7b9f85f71b1aa5e9a1b4c40710f33 (patch) | |
tree | 47535bcb196485d61064c2e875b760df11e22b8f /src/client/input.cc | |
parent | e217a3fd8e5af449e2305aaf78723ff25b8fcbc2 (diff) |
removed second localplayer
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)); } } |