[colobot] 34/74: Added comment explaining container choice
Didier Raboud
odyx at moszumanska.debian.org
Mon Nov 7 07:50:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 859cec774a85e45141be3d32fcf788709cd8d13d
Author: Jeremy Mickelson <Jeremy.Mickelson at gmail.com>
Date: Sat Aug 13 12:18:54 2016 -0600
Added comment explaining container choice
---
src/object/object_manager.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/object/object_manager.cpp b/src/object/object_manager.cpp
index 0e6e28a..a903a3a 100644
--- a/src/object/object_manager.cpp
+++ b/src/object/object_manager.cpp
@@ -282,6 +282,8 @@ std::vector<CObject*> CObjectManager::RadarAll(CObject* pThis, Math::Vector this
RadarFilter filter_flying = static_cast<RadarFilter>(filter & (FILTER_ONLYLANDING | FILTER_ONLYFLYING));
RadarFilter filter_enemy = static_cast<RadarFilter>(filter & (FILTER_FRIENDLY | FILTER_ENEMY | FILTER_NEUTRAL));
+ // Use a multimap to allow for multiple objects at exactly the same distance
+ // from the origin to be returned.
std::multimap<float, CObject*> best;
for ( auto it = m_objects.begin() ; it != m_objects.end() ; ++it )
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list