From bcdab2aeab59f37281daa49f08d09c25f548b765 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 11 Mar 2013 19:32:39 +0100 Subject: [PATCH] Fix wrong padding breaking local map for cells where the bounds center is far from the origin --- apps/openmw/mwrender/localmap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/localmap.cpp b/apps/openmw/mwrender/localmap.cpp index 3efcd08dd..c86a61cfa 100644 --- a/apps/openmw/mwrender/localmap.cpp +++ b/apps/openmw/mwrender/localmap.cpp @@ -162,7 +162,8 @@ void LocalMap::requestMap(MWWorld::Ptr::CellStore* cell, mBounds.merge(Vector3(c4.x, c4.y, 0)); // apply a little padding - mBounds.scale ((mBounds.getSize ()+Ogre::Vector3(1000,1000,0)) / mBounds.getSize ()); + mBounds.setMinimum (mBounds.getMinimum() - Vector3(500,500,0)); + mBounds.setMaximum (mBounds.getMaximum() + Vector3(500,500,0)); Vector2 center(mBounds.getCenter().x, mBounds.getCenter().y);