Changed: edit force_camera_fp command

--HG--
branch : compatibility-develop
This commit is contained in:
Riasan 2017-05-23 19:38:26 +02:00
parent 6fb823a9be
commit 2dbcb978a4
2 changed files with 7 additions and 4 deletions

View file

@ -226,7 +226,7 @@ class CAHToggleCamera : public IActionHandler
REGISTER_ACTION_HANDLER (CAHToggleCamera, "toggle_camera"); REGISTER_ACTION_HANDLER (CAHToggleCamera, "toggle_camera");
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
class CAHToggleForceFP : public IActionHandler class CAHTForceFP : public IActionHandler
{ {
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
{ {
@ -234,7 +234,7 @@ class CAHToggleForceFP : public IActionHandler
UserEntity->forceCamareaFirstPerson(); UserEntity->forceCamareaFirstPerson();
} }
}; };
REGISTER_ACTION_HANDLER (CAHToggleForceFP, "force_camera_fp"); REGISTER_ACTION_HANDLER (CAHTForceFP, "force_camera_fp");
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
class CAHToggleNames : public IActionHandler class CAHToggleNames : public IActionHandler

View file

@ -3224,10 +3224,13 @@ void CUserEntity::forceCamareaFirstPerson()
return; return;
// Only if not inside a building. // Only if not inside a building.
if(!UserEntity->forceIndoorFPV()) if(!UserEntity->forceIndoorFPV())
{
if (UserEntity->viewMode() != CUserEntity::FirstPV)
{ {
//Enter the 1st Person View Mode //Enter the 1st Person View Mode
UserEntity->viewMode(CUserEntity::FirstPV); UserEntity->viewMode(CUserEntity::FirstPV);
} }
}
}// forceCamareaFirstPerson // }// forceCamareaFirstPerson //
//--------------------------------------------------- //---------------------------------------------------