diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d9104199e..da7b60752b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -145,6 +145,7 @@ Bug #5161: Creature companions can't be activated when they are knocked down Bug #5164: Faction owned items handling is incorrect Bug #5166: Scripts still should be executed after player's death + Bug #5168: Force1stPerson and Force3rdPerson commands are not really force view change Feature #1774: Handle AvoidNode Feature #2229: Improve pathfinding AI Feature #3025: Analogue gamepad movement controls diff --git a/apps/openmw/mwbase/world.hpp b/apps/openmw/mwbase/world.hpp index 955e77168d..261f296085 100644 --- a/apps/openmw/mwbase/world.hpp +++ b/apps/openmw/mwbase/world.hpp @@ -403,7 +403,7 @@ namespace MWBase virtual osg::Matrixf getActorHeadTransform(const MWWorld::ConstPtr& actor) const = 0; - virtual void togglePOV() = 0; + virtual void togglePOV(bool force = false) = 0; virtual bool isFirstPerson() const = 0; virtual void togglePreviewMode(bool enable) = 0; virtual bool toggleVanityMode(bool enable) = 0; diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index c361ddf031..ac4fb3a169 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -1333,9 +1333,9 @@ namespace MWRender return mCurrentCameraPos; } - void RenderingManager::togglePOV() + void RenderingManager::togglePOV(bool force) { - mCamera->toggleViewMode(); + mCamera->toggleViewMode(force); } void RenderingManager::togglePreviewMode(bool enable) diff --git a/apps/openmw/mwrender/renderingmanager.hpp b/apps/openmw/mwrender/renderingmanager.hpp index 49da50be36..fb94caec88 100644 --- a/apps/openmw/mwrender/renderingmanager.hpp +++ b/apps/openmw/mwrender/renderingmanager.hpp @@ -204,7 +204,7 @@ namespace MWRender float getCameraDistance() const; Camera* getCamera(); const osg::Vec3f& getCameraPosition() const; - void togglePOV(); + void togglePOV(bool force = false); void togglePreviewMode(bool enable); bool toggleVanityMode(bool enable); void allowVanityMode(bool allow); diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index e2506edb86..906e5d0088 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -358,7 +358,7 @@ namespace MWScript virtual void execute (Interpreter::Runtime& runtime) { if (!MWBase::Environment::get().getWorld()->isFirstPerson()) - MWBase::Environment::get().getWorld()->togglePOV(); + MWBase::Environment::get().getWorld()->togglePOV(true); } }; @@ -367,7 +367,7 @@ namespace MWScript virtual void execute (Interpreter::Runtime& runtime) { if (MWBase::Environment::get().getWorld()->isFirstPerson()) - MWBase::Environment::get().getWorld()->togglePOV(); + MWBase::Environment::get().getWorld()->togglePOV(true); } }; diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 7aa9d6023a..6f2a6bf4cb 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2395,9 +2395,9 @@ namespace MWWorld return mPhysics->isOnGround(ptr); } - void World::togglePOV() + void World::togglePOV(bool force) { - mRendering->togglePOV(); + mRendering->togglePOV(force); } bool World::isFirstPerson() const diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index 76d0154777..f803079fbd 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -518,7 +518,7 @@ namespace MWWorld osg::Matrixf getActorHeadTransform(const MWWorld::ConstPtr& actor) const override; - void togglePOV() override; + void togglePOV(bool force = false) override; bool isFirstPerson() const override;