forked from 0ad/0ad
Check if units are in the world in UnitRenderer::PickAllEntitiesAtPoint. Probably fixes #3587, though I'm not sure as it proved unreproducible.
This was SVN commit r17228.
This commit is contained in:
parent
1b00bfc98d
commit
607955489d
@ -274,7 +274,7 @@ public:
|
||||
for (size_t i = 0; i < m_Units.size(); ++i)
|
||||
{
|
||||
SUnit& unit = m_Units[i];
|
||||
if (!unit.actor)
|
||||
if (!unit.actor || !unit.inWorld)
|
||||
continue;
|
||||
if (unit.sweptBounds.RayIntersect(origin, dir))
|
||||
candidates.push_back(&unit);
|
||||
|
Loading…
Reference in New Issue
Block a user