|
@@ -89,8 +89,8 @@ void GameClient::reply( Game* zGame )
|
|
|
zGame->api( req, this );
|
|
|
requests.leeren();
|
|
|
other.unlock();
|
|
|
- int x = (int)zPlayer->getPosition().x;
|
|
|
- int y = (int)zPlayer->getPosition().y;
|
|
|
+ int x = (int)floor( zPlayer->getPosition().x );
|
|
|
+ int y = (int)floor( zPlayer->getPosition().y );
|
|
|
int d = zPlayer->getCurrentDimensionId();
|
|
|
foreground.lock();
|
|
|
client->zForegroundWriter()->schreibe( (char*)&Message::POSITION_UPDATE, 1 );
|
|
@@ -138,9 +138,9 @@ void GameClient::reply( Game* zGame )
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Punkt lastMin = zGame->getChunkCenter( (int)lastPos.x - CHUNK_SIZE * viewDistance, (int)lastPos.y - CHUNK_SIZE * viewDistance );
|
|
|
+ Punkt lastMin = zGame->getChunkCenter( (int)floor( lastPos.x ) - CHUNK_SIZE * viewDistance, (int)floor( lastPos.y ) - CHUNK_SIZE * viewDistance );
|
|
|
Punkt curMin = zGame->getChunkCenter( x - CHUNK_SIZE * viewDistance, y - CHUNK_SIZE * viewDistance );
|
|
|
- Punkt lastMax = zGame->getChunkCenter( (int)lastPos.x + CHUNK_SIZE * viewDistance, (int)lastPos.y + CHUNK_SIZE * viewDistance );
|
|
|
+ Punkt lastMax = zGame->getChunkCenter( (int)floor( lastPos.x ) + CHUNK_SIZE * viewDistance, (int)floor( lastPos.y ) + CHUNK_SIZE * viewDistance );
|
|
|
Punkt curMax = zGame->getChunkCenter( x + CHUNK_SIZE * viewDistance, y + CHUNK_SIZE * viewDistance );
|
|
|
Dimension* dim = zGame->zDimension( d );
|
|
|
if( dim )
|