no need to render dead units when selecting

This commit is contained in:
titiger
2015-01-03 22:24:21 +01:00
parent 109a5b9985
commit 4e0c96adae

View File

@@ -7728,6 +7728,11 @@ vector<Unit *> Renderer::renderUnitsFast(bool renderingShadows, bool colorPickin
visibleUnitIndex < (int)qCache.visibleQuadUnitList.size(); ++visibleUnitIndex) {
Unit *unit = qCache.visibleQuadUnitList[visibleUnitIndex];
if(renderingShadows==false && unit->isAlive()==false){
// no need to render dead units for selection
continue;
}
if(renderOnlyBuildings==true && unit->getType()->hasSkillClass(scMove)){
continue;
}