mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
map improvements
This commit is contained in:
12
Event.cpp
12
Event.cpp
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user