1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #include "nel/3d/u_camera.h"
27 #include "../../input.h"
28 #include "../user_controls.h"
29 #include "../../actions_client.h"
30 #include "../../user_entity.h"
31 #include "../../view.h"
32 #include "../../interface_v3/interface_manager.h"
33 #include "../../misc.h"
34 #include "../../entities.h"
35 #include "../../time_client.h"
42 using namespace NLMISC
;
49 extern sint CompassMode
;
50 extern UCamera MainCam
;
51 extern CEventsListener EventsListener
; // Inputs Manager
62 //-----------------------------------------------
64 // Manage the Third Person View Mode (start).
65 //-----------------------------------------------
66 void CUserControls::thirdModeStart()
68 // Third person view, user is selectable.
69 UserEntity
->selectable(true);
71 _InternalView
= false;
73 // Initialize the camera
74 UserEntity
->dir(UserEntity
->front());
76 // Update the mount direction.
77 CEntityCL
*mount
= EntitiesMngr
.entity(UserEntity
->parent());
80 mount
->front(UserEntity
->front());
81 mount
->dir(UserEntity
->dir());
84 // Show/hide all or parts of the user body (after _InternaView is set).
85 UserEntity
->updateVisualDisplay();
88 //-----------------------------------------------
90 // Manage the Third Person View Mode (stop).
91 //-----------------------------------------------
92 void CUserControls::thirdModeStop()
96 //-----------------------------------------------
98 // Manage the Third Person View Mode.
99 //-----------------------------------------------
100 void CUserControls::thirdMode()
102 // Manage common moves.
106 View
.viewPos(UserEntity
->pos());