mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-17 08:26:50 -04:00
small map fix
This commit is contained in:
parent
71d04e16da
commit
9b0254a158
@ -406,16 +406,15 @@ void MapWindow::globalMapUpdatePlayer ()
|
|||||||
rotatingSubskin->setCenter(MyGUI::IntPoint(16,16));
|
rotatingSubskin->setCenter(MyGUI::IntPoint(16,16));
|
||||||
float angle = std::atan2(dir.x, dir.y);
|
float angle = std::atan2(dir.x, dir.y);
|
||||||
rotatingSubskin->setAngle(angle);
|
rotatingSubskin->setAngle(angle);
|
||||||
}
|
|
||||||
|
|
||||||
// set the view offset so that player is in the center
|
// set the view offset so that player is in the center
|
||||||
MyGUI::IntSize viewsize = mGlobalMap->getSize();
|
MyGUI::IntSize viewsize = mGlobalMap->getSize();
|
||||||
MyGUI::IntPoint viewoffs(0.5*viewsize.width - worldX, 0.5*viewsize.height - worldY);
|
MyGUI::IntPoint viewoffs(0.5*viewsize.width - worldX, 0.5*viewsize.height - worldY);
|
||||||
mGlobalMap->setViewOffset(viewoffs);
|
mGlobalMap->setViewOffset(viewoffs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::notifyPlayerUpdate ()
|
void MapWindow::notifyPlayerUpdate ()
|
||||||
{
|
{
|
||||||
if (mGlobal)
|
globalMapUpdatePlayer ();
|
||||||
globalMapUpdatePlayer ();
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user