|
|
@@ -886,10 +886,12 @@ void Game::spawnItem(
|
|
|
Dimension* dim = zDimension(dimensionId);
|
|
|
if (dim)
|
|
|
{
|
|
|
- dim->addEntity(itemEntity);
|
|
|
- dim->zChunk(Game::getChunkCenter((int)itemEntity->getLocation().x,
|
|
|
- (int)itemEntity->getLocation().y))
|
|
|
+ Punkt center = Game::getChunkCenter(
|
|
|
+ (int)itemEntity->getLocation().x, (int)itemEntity->getLocation().y);
|
|
|
+ dim->zChunk(center)
|
|
|
->onEntityEnters(itemEntity, 0);
|
|
|
+ itemEntity->setLastChunk(dimensionId, center);
|
|
|
+ dim->addEntity(itemEntity);
|
|
|
}
|
|
|
else
|
|
|
{
|