mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
# Bug fixes.
- Fixed a crash that was happening in pathfinding on maps where some tiles had invalid texture names (from earlier versions of the game). - Releasing the mouse over the minimap while dragging a selection band will no longer cause the view to move there. Unfortunately, the bandbox still won't properly "release". The bandbox input routine should ideally be placed at a higher priority than the GUI, separate from the other Interact.cpp routines. This was SVN commit r4711.
This commit is contained in:
@@ -78,7 +78,7 @@ void CUnitManager::DeleteAll()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// PickUnit: iterate through units testing given ray against bounds of each
|
||||
// unit; return the closest unit, or null if everything missed
|
||||
CUnit* CUnitManager::PickUnit(const CVector3D& origin, const CVector3D& dir) const
|
||||
CUnit* CUnitManager::PickUnit(const CVector3D& origin, const CVector3D& dir, bool entitiesOnly) const
|
||||
{
|
||||
CLOSManager* losMgr = g_Game->GetWorld()->GetLOSManager();
|
||||
|
||||
@@ -94,6 +94,8 @@ CUnit* CUnitManager::PickUnit(const CVector3D& origin, const CVector3D& dir) con
|
||||
float tmin, tmax;
|
||||
|
||||
CEntity* ent = unit->GetEntity();
|
||||
if( entitiesOnly && !ent )
|
||||
continue;
|
||||
if( ent && !ent->m_visible )
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user