summaryrefslogtreecommitdiffstats
path: root/Room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Room.cpp')
-rw-r--r--Room.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Room.cpp b/Room.cpp
index e364293..4923169 100644
--- a/Room.cpp
+++ b/Room.cpp
@@ -23,8 +23,10 @@ const Room& Room::operator=(const Room &room) {
std::vector<SharedPtr<LevelObject> > Room::getChildren() {
std::vector<SharedPtr<LevelObject> > children;
- for(size_t i = 0; i < vertices.size(); i++)
- children.push_back(SharedPtr<LevelObject>(new LevelVertex(this, i, this)));
+ for(size_t i = 0; i < vertices.size(); i++) {
+ if(vertices[i]->isDirect())
+ children.push_back(SharedPtr<LevelObject>(new LevelVertex(this, i, this)));
+ }
for(size_t i = 0; i < edges.size(); i++)
children.push_back(SharedPtr<LevelObject>(new LevelEdge(this, i, this)));