From 2dbcb978a4e25a8e66f0439e1e3549d0210257af Mon Sep 17 00:00:00 2001 From: Riasan Date: Tue, 23 May 2017 19:38:26 +0200 Subject: [PATCH] Changed: edit force_camera_fp command --HG-- branch : compatibility-develop --- code/ryzom/client/src/interface_v3/action_handler_move.cpp | 4 ++-- code/ryzom/client/src/user_entity.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_move.cpp b/code/ryzom/client/src/interface_v3/action_handler_move.cpp index b33f71da5..62d51d0b7 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_move.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_move.cpp @@ -226,7 +226,7 @@ class CAHToggleCamera : public IActionHandler REGISTER_ACTION_HANDLER (CAHToggleCamera, "toggle_camera"); // ------------------------------------------------------------------------------------------------ -class CAHToggleForceFP : public IActionHandler +class CAHTForceFP : public IActionHandler { virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) { @@ -234,7 +234,7 @@ class CAHToggleForceFP : public IActionHandler UserEntity->forceCamareaFirstPerson(); } }; -REGISTER_ACTION_HANDLER (CAHToggleForceFP, "force_camera_fp"); +REGISTER_ACTION_HANDLER (CAHTForceFP, "force_camera_fp"); // ------------------------------------------------------------------------------------------------ class CAHToggleNames : public IActionHandler diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 5fd8c7dfb..166732b9c 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -3225,8 +3225,11 @@ void CUserEntity::forceCamareaFirstPerson() // Only if not inside a building. if(!UserEntity->forceIndoorFPV()) { - //Enter the 1st Person View Mode - UserEntity->viewMode(CUserEntity::FirstPV); + if (UserEntity->viewMode() != CUserEntity::FirstPV) + { + //Enter the 1st Person View Mode + UserEntity->viewMode(CUserEntity::FirstPV); + } } }// forceCamareaFirstPerson //