From 666ff05c428453caf3f1c9cbf3fd7bbf2523017e Mon Sep 17 00:00:00 2001 From: Fabien_HENON Date: Tue, 7 Aug 2012 21:06:30 +0200 Subject: [PATCH] Changed: #1469 currentView, currentViewPos and currentCameraTarget functions for CamAnimMode and DeathMode --HG-- branch : gsoc2012-fabien --- code/ryzom/client/src/view.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/ryzom/client/src/view.cpp b/code/ryzom/client/src/view.cpp index ded81013d..a233fe155 100644 --- a/code/ryzom/client/src/view.cpp +++ b/code/ryzom/client/src/view.cpp @@ -148,6 +148,10 @@ void CView::update() //----------------------------------------------- CVector CView::currentViewPos() const { + // If we are in camanimmode or deathmode we just return the viewpos + if (UserControls.mode() == CUserControls::DeathMode || UserControls.mode() == CUserControls::CamAnimMode) + return _ViewPos; + // clamp to the collisioned camera distance float minCamDist= min(_CurrentCameraDist, _CollisionCameraDist); @@ -187,6 +191,10 @@ CVector CView::currentViewPos() const //----------------------------------------------- CVector CView::currentView() const { + // If we are in camanimmode or deathmode we just return the view + if (UserControls.mode() == CUserControls::DeathMode || UserControls.mode() == CUserControls::CamAnimMode) + return _View; + if(_RearView) { CVector v; @@ -205,6 +213,10 @@ CVector CView::currentView() const //----------------------------------------------- CVector CView::currentCameraTarget() const { + // If we are in camanimmode or deathmode we just return the viewpos + if (UserControls.mode() == CUserControls::DeathMode || UserControls.mode() == CUserControls::CamAnimMode) + return _ViewPos; + if(UserEntity->viewMode() == CUserEntity::FirstPV || _ForceFirstPersonView) return currentViewPos(); else