diff options
Diffstat (limited to 'src/systems/mapping.cpp')
-rw-r--r-- | src/systems/mapping.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/systems/mapping.cpp b/src/systems/mapping.cpp index a3a17ec..c7c2f9d 100644 --- a/src/systems/mapping.cpp +++ b/src/systems/mapping.cpp | |||
@@ -195,4 +195,18 @@ void MappingSystem::loadMap(size_t mapId) | |||
195 | MappableComponent::Boundary::Type::danger); | 195 | MappableComponent::Boundary::Type::danger); |
196 | } | 196 | } |
197 | } | 197 | } |
198 | |||
199 | for (const Map::Object& object : map.getObjects()) | ||
200 | { | ||
201 | const Prototype& prototype = game_.getPrototypeManager(). | ||
202 | getPrototype(object.getType()); | ||
203 | |||
204 | id_type emplacedObject = prototype.instantiate( | ||
205 | game_, | ||
206 | object.getX(), | ||
207 | object.getY(), | ||
208 | object.getItems()); | ||
209 | |||
210 | mappable.getInstances()[object.getIndex()] = emplacedObject; | ||
211 | } | ||
198 | } | 212 | } |