mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Changed: edit force_camera_fp command
--HG-- branch : develop
This commit is contained in:
parent
319cab93cd
commit
8b4d189c31
3 changed files with 10 additions and 9 deletions
|
@ -226,15 +226,15 @@ 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 */)
|
||||||
{
|
{
|
||||||
// Change the camera view to first person
|
// Change the camera view to first person
|
||||||
UserEntity->forceCamareaFirstPerson();
|
UserEntity->forceCameraFirstPerson();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER (CAHToggleForceFP, "force_camera_fp");
|
REGISTER_ACTION_HANDLER (CAHTForceFP, "force_camera_fp");
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
class CAHToggleNames : public IActionHandler
|
class CAHToggleNames : public IActionHandler
|
||||||
|
|
|
@ -3214,10 +3214,10 @@ void CUserEntity::toggleCamera()
|
||||||
}// toggleCamera //
|
}// toggleCamera //
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
// forceCamareaFirstPerson :
|
// forceCameraFirstPerson :
|
||||||
// Force Camera to First Person View
|
// Force Camera to First Person View
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CUserEntity::forceCamareaFirstPerson()
|
void CUserEntity::forceCameraFirstPerson()
|
||||||
{
|
{
|
||||||
// You cannot change the camera view when dead.
|
// You cannot change the camera view when dead.
|
||||||
if(isDead())
|
if(isDead())
|
||||||
|
@ -3225,10 +3225,11 @@ void CUserEntity::forceCamareaFirstPerson()
|
||||||
// Only if not inside a building.
|
// Only if not inside a building.
|
||||||
if(!UserEntity->forceIndoorFPV())
|
if(!UserEntity->forceIndoorFPV())
|
||||||
{
|
{
|
||||||
//Enter the 1st Person View Mode
|
if (UserEntity->viewMode() != CUserEntity::FirstPV)
|
||||||
UserEntity->viewMode(CUserEntity::FirstPV);
|
//Enter the 1st Person View Mode
|
||||||
|
UserEntity->viewMode(CUserEntity::FirstPV);
|
||||||
}
|
}
|
||||||
}// forceCamareaFirstPerson //
|
}// forceCameraFirstPerson //
|
||||||
|
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
// getScale :
|
// getScale :
|
||||||
|
|
|
@ -370,7 +370,7 @@ public:
|
||||||
/// Toggle Camera (First/Third Person)
|
/// Toggle Camera (First/Third Person)
|
||||||
void toggleCamera();
|
void toggleCamera();
|
||||||
/// Force Camera First Person View
|
/// Force Camera First Person View
|
||||||
void forceCamareaFirstPerson();
|
void forceCameraFirstPerson();
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/// Return the entity scale. (return 1.0 if there is any problem).
|
/// Return the entity scale. (return 1.0 if there is any problem).
|
||||||
|
|
Loading…
Reference in a new issue