From 5c94c654d48edc624b23e16aacbe8f46a0d6aff0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 9 Mar 2013 13:27:24 +0100 Subject: [PATCH] Fix wrong rotation of objects dropped on the ground --- apps/openmw/mwworld/worldimp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 4b06d6a08..35ea8bbef 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1188,6 +1188,9 @@ namespace MWWorld pos.pos[0] = result.second[0]; pos.pos[1] = result.second[1]; pos.pos[2] = result.second[2]; + // We want only the Z part of the player's rotation + pos.rot[0] = 0; + pos.rot[1] = 0; Ptr dropped = copyObjectToCell(object, *cell, pos); PCDropped(dropped); @@ -1242,6 +1245,9 @@ namespace MWWorld ESM::Position pos = actor.getRefData().getPosition(); + // We want only the Z part of the actor's rotation + pos.rot[0] = 0; + pos.rot[1] = 0; Ogre::Vector3 orig = Ogre::Vector3(pos.pos[0], pos.pos[1], pos.pos[2]);