map improvements

This commit is contained in:
milek7
2019-02-18 17:46:31 +01:00
parent 52ff1ecb98
commit 89cf20a251
16 changed files with 240 additions and 180 deletions

View File

@@ -2230,3 +2230,15 @@ event_manager::export_as_text( std::ostream &Output ) const {
}
}
}
std::vector<TEventLauncher*> event_manager::find_eventlaunchers(glm::vec2 center, float radius) const {
std::vector<TEventLauncher *> results;
for (auto &launcher : m_launchers.sequence()) {
glm::dvec3 location = launcher->location();
if (glm::distance2(glm::vec2(location.x, location.z), center) < radius)
results.push_back(launcher);
}
return results;
}