Fix to last commit

This commit is contained in:
Henrique Santiago 2013-03-04 22:46:14 -03:00
parent 9955de573b
commit 5396ea6231
1 changed files with 2 additions and 2 deletions

View File

@ -480,12 +480,12 @@ bool Map::isAwareOfPosition(const Position& pos)
Position groundedPos = pos; Position groundedPos = pos;
while(groundedPos.z != m_centralPosition.z) { while(groundedPos.z != m_centralPosition.z) {
if(groundedPos.z > m_centralPosition.z) { if(groundedPos.z > m_centralPosition.z) {
if(groundedPos.z == Otc::MAX_Z) // When pos == 65535,65535,15 we cant go up to 65536,65536,14 if(groundedPos.x == 65535 || groundedPos.y == 65535) // When pos == 65535,65535,15 we cant go up to 65536,65536,14
break; break;
groundedPos.coveredUp(); groundedPos.coveredUp();
} }
else { else {
if(groundedPos.z == 0) // When pos == 0,0,0 we cant go down to -1,-1,1 if(groundedPos.x == 0 || groundedPos.y == 0) // When pos == 0,0,0 we cant go down to -1,-1,1
break; break;
groundedPos.coveredDown(); groundedPos.coveredDown();
} }