mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Objects list is now private member of CMap
This commit is contained in:
@@ -132,7 +132,7 @@ std::vector<AudioPath> MapAudioPlayer::getAmbientSounds(const int3 & tile)
|
||||
|
||||
for(auto & objectID : objects[tile.z][tile.x][tile.y])
|
||||
{
|
||||
const auto & object = GAME->map().getMap()->objects[objectID.getNum()];
|
||||
const auto & object = GAME->map().getMap()->getObject(objectID);
|
||||
|
||||
assert(object);
|
||||
if (!object)
|
||||
@@ -206,10 +206,9 @@ MapAudioPlayer::MapAudioPlayer()
|
||||
|
||||
objects.resize(boost::extents[mapSize.z][mapSize.x][mapSize.y]);
|
||||
|
||||
for(const auto & obj : GAME->map().getMap()->objects)
|
||||
for(const auto & obj : GAME->map().getMap()->getObjects())
|
||||
{
|
||||
if (obj)
|
||||
addObject(obj.get());
|
||||
addObject(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user