Increase maximum move offset to be 64 instead of 32
This commit is contained in:
parent
bd8c883e13
commit
57c432d3ea
|
@ -567,22 +567,38 @@ Position MapView::getPosition(const Point& point, const Size& mapSize)
|
|||
void MapView::move(int x, int y)
|
||||
{
|
||||
if(m_moveOffset.x + x > 32) {
|
||||
m_customCameraPosition.x += 1;
|
||||
if(m_moveOffset.x + x > 64)
|
||||
m_customCameraPosition.x += 2;
|
||||
else
|
||||
m_customCameraPosition.x += 1;
|
||||
|
||||
m_moveOffset.x = x;
|
||||
requestVisibleTilesCacheUpdate();
|
||||
} else if(m_moveOffset.x - x < -32) {
|
||||
m_customCameraPosition.x -= 1;
|
||||
if(m_moveOffset.x - x < -64)
|
||||
m_customCameraPosition.x -= 2;
|
||||
else
|
||||
m_customCameraPosition.x -= 1;
|
||||
|
||||
m_moveOffset.x = x;
|
||||
requestVisibleTilesCacheUpdate();
|
||||
} else
|
||||
m_moveOffset.x += x;
|
||||
|
||||
if(m_moveOffset.y + y > 32) {
|
||||
m_customCameraPosition.y += 1;
|
||||
if(m_moveOffset.y + y > 64)
|
||||
m_customCameraPosition.y += 2;
|
||||
else
|
||||
m_customCameraPosition.y += 1;
|
||||
|
||||
m_moveOffset.y = y;
|
||||
requestVisibleTilesCacheUpdate();
|
||||
} else if(m_moveOffset.y - y < -32) {
|
||||
m_customCameraPosition.y -= 1;
|
||||
if(m_moveOffset.y - y < -64)
|
||||
m_customCameraPosition.y -= 2;
|
||||
else
|
||||
m_customCameraPosition.y -= 1;
|
||||
|
||||
m_moveOffset.y = y;
|
||||
requestVisibleTilesCacheUpdate();
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue