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/camera.cc | |
parent | e217a3fd8e5af449e2305aaf78723ff25b8fcbc2 (diff) |
removed second localplayer
Diffstat (limited to 'src/client/camera.cc')
-rw-r--r-- | src/client/camera.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/camera.cc b/src/client/camera.cc index 03a4e1b..dcf4acf 100644 --- a/src/client/camera.cc +++ b/src/client/camera.cc @@ -5,7 +5,7 @@ */ #include "math/mathlib.h" -#include "core/player.h" +#include "core/core.h" #include "client/client.h" #include "client/camera.h" #include "render/render.h" @@ -82,7 +82,7 @@ void set_mode(Mode newmode) { case Track: // switch camera to Track mode mode = Track; - yaw_target = core::Player::local.control->direction(); + yaw_target = core::game()->localplayer()->control->direction(); yaw_current = yaw_target; pitch_target = pitch_track; pitch_current = pitch_target; @@ -91,7 +91,7 @@ void set_mode(Mode newmode) { case Free: // switch camera to Free mode mode = Free; - yaw_target = core::Player::local.control->direction(); + yaw_target = core::game()->localplayer()->control->direction(); yaw_current = yaw_target; pitch_target = pitch_track; pitch_current = pitch_target; @@ -112,7 +112,7 @@ void set_mode(Mode newmode) { void next_mode() { - if (!core::Player::local.control) { + if (!core::game()->localplayer()->control) { set_mode(Overview); return; } @@ -133,7 +133,7 @@ void next_mode() void draw(float elapsed) { - if (!core::Player::local.control) { + if (!core::game()->localplayer()->control) { // switch the camera to Overview of the player is not controling anything if (mode != Overview) { set_mode(Overview); @@ -142,11 +142,11 @@ void draw(float elapsed) if (mode == Overview) set_mode(Track); - camera::target = core::Player::local.control->location(); + camera::target = core::game()->localplayer()->control->location(); } if (mode == Track) { - yaw_target = core::Player::local.control->direction(); + yaw_target = core::game()->localplayer()->control->direction(); } if ((mode == Free) || (mode == Track)) { |