1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:53:52 +00:00

partial coordinates fix (slightly better results when changing cells, but still not completely correct)

This commit is contained in:
Marc Zinnschlag 2010-08-20 17:14:07 +02:00
parent bdd5e2f064
commit 1f077a5d5f

View file

@ -37,12 +37,12 @@ namespace MWRender
if (updateCamera) if (updateCamera)
camera->setPosition (Ogre::Vector3 ( camera->setPosition (Ogre::Vector3 (
mPlayer.ref.pos.pos[0], mPlayer.ref.pos.pos[0],
mPlayer.ref.pos.pos[2], -mPlayer.ref.pos.pos[2],
mPlayer.ref.pos.pos[1])); mPlayer.ref.pos.pos[1]));
// TODO: Update sound listener // TODO: Update sound listener
} }
void setCell (MWWorld::Ptr::CellStore *cellStore) void setCell (MWWorld::Ptr::CellStore *cellStore)
{ {
mCellStore = cellStore; mCellStore = cellStore;
@ -54,7 +54,6 @@ namespace MWRender
// orientation. After the call, the new position is returned. // orientation. After the call, the new position is returned.
void moveRel(float &relX, float &relY, float &relZ) void moveRel(float &relX, float &relY, float &relZ)
{ {
// TODO: Update mPlayer state
using namespace Ogre; using namespace Ogre;
// Move camera relative to its own direction // Move camera relative to its own direction
@ -75,7 +74,7 @@ namespace MWRender
// Set the position // Set the position
setPos(relX, relY, relZ); setPos(relX, relY, relZ);
} }
MWWorld::Ptr getPlayer() MWWorld::Ptr getPlayer()
{ {
MWWorld::Ptr ptr (&mPlayer, mCellStore); MWWorld::Ptr ptr (&mPlayer, mCellStore);