From 15c666a7efaf90df0e053716ba1a2f2bb22742c0 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Mon, 29 Jun 2026 23:12:52 +0200 Subject: [PATCH] Allow to speed up external camera movement with Ctrl key Shift isn't used as that would affect joystick controls and we probably should discourage the user from roaming around in external cam mode too much, so they won't forget that they're not in regular free fly out of the cab. --- vehicle/Camera.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vehicle/Camera.cpp b/vehicle/Camera.cpp index 3b6f8c07..875b90a1 100644 --- a/vehicle/Camera.cpp +++ b/vehicle/Camera.cpp @@ -84,8 +84,8 @@ TCamera::OnCommand( command_data const &Command ) { // if( movespeed == 0.0 ) { break; } // enable to fix external cameras in place auto const speedmultiplier = ( - ( ( m_owner == nullptr ) && ( Command.command == user_command::movehorizontalfast ) ) ? - 30.0 : + ( ( true == FreeFlyModeFlag ) && ( Command.command == user_command::movehorizontalfast ) ) ? + ( m_owner == nullptr ) ? 30.0 : 5.0 : 1.0 ); // left-right @@ -107,8 +107,8 @@ TCamera::OnCommand( command_data const &Command ) { // if( movespeed == 0.0 ) { break; } // enable to fix external cameras in place auto const speedmultiplier = ( - ( ( m_owner == nullptr ) && ( Command.command == user_command::moveverticalfast ) ) ? - 10.0 : + ( ( true == FreeFlyModeFlag ) && ( Command.command == user_command::moveverticalfast ) ) ? + ( m_owner == nullptr ) ? 10.0 : 3.0 : 1.0 ); // up-down m_moverate.y = ComputeAxisSpeed(Command.param1, walkspeed, movespeed, stickthreshold) * speedmultiplier; @@ -160,6 +160,7 @@ void TCamera::Update() // update position if( ( m_owner == nullptr ) + || ( true == FreeFlyModeFlag ) || ( false == Global.ctrlState ) || ( true == DebugCameraFlag ) ) { // ctrl is used for mirror view, so we ignore the controls when in vehicle if ctrl is pressed