1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-05 04:15:33 +00:00

don't update world arrow position in interior

This commit is contained in:
scrawl 2012-09-20 17:35:30 +02:00
parent e5e3d829d0
commit 451a9fd6ac

View file

@ -368,6 +368,10 @@ void MapWindow::open()
float worldX = ((pos.x / 8192.f-0.5) / 30.f+1)/2.f;
float worldY = ((pos.z / 8192.f+1.5) / 30.f+1)/2.f;
// for interiors, we have no choice other than using the last position & direction.
/// \todo save this last position in the savegame?
if (MWBase::Environment::get().getWorld ()->isCellExterior ())
{
mPlayerArrowGlobal->setPosition(MyGUI::IntPoint(tex->getWidth() * worldX - 16, tex->getHeight() * worldY - 16));
MyGUI::ISubWidget* main = mPlayerArrowGlobal->getSubWidgetMain();
@ -375,6 +379,7 @@ void MapWindow::open()
rotatingSubskin->setCenter(MyGUI::IntPoint(16,16));
float angle = std::atan2(dir.x, dir.y);
rotatingSubskin->setAngle(angle);
}
mPlayerArrowGlobal->setImageTexture ("textures\\compass.dds");
}