diff options
-rw-r--r-- | src/client/input.cc | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/client/input.cc b/src/client/input.cc index 85d8526..a779ec8 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -1043,19 +1043,14 @@ void frame() { case render::Camera::Track: case render::Camera::Cockpit: - if (mouse_control) - { - local_direction = 0.0f; - local_pitch = 0.0f; - - // enable autopilot override - local_controlflags = local_controlflags | core::EntityControlable::ControlFlagOverride; - } else - { - // disable autopilot override - local_controlflags = local_controlflags & ~core::EntityControlable::ControlFlagOverride; - } + + // disable local control + local_direction = 0.0f; + local_pitch = 0.0f; + // disable autopilot override + local_controlflags = local_controlflags & ~core::EntityControlable::ControlFlagOverride; + render::camera().set_freelook_direction(180.0f * mouse_direction); render::camera().set_freelook_pitch(90.0f * mouse_pitch); @@ -1067,7 +1062,7 @@ void frame() render::camera().set_freelook_direction(180.0f * mouse_direction); render::camera().set_freelook_pitch(90.0f * mouse_pitch); - + // disable autopilot override local_controlflags = local_controlflags & ~core::EntityControlable::ControlFlagOverride; break; |