mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 20:42:34 +02:00
- added validation for unit's to ensure they still have the cached commandclass
This commit is contained in:
@@ -986,7 +986,8 @@ Unit * Faction::findClosestUnitWithSkillClass( const Vec2i &pos,const CommandCla
|
||||
Unit *curUnit = findUnit(iter->second);
|
||||
if(curUnit != NULL) {
|
||||
|
||||
bool isUnitPossibleCandidate = true;
|
||||
const CommandType *cmdType = curUnit->getType()->getFirstCtOfClass(cmdClass);
|
||||
bool isUnitPossibleCandidate = (cmdType != NULL);
|
||||
if(skillClassList.size() > 0) {
|
||||
isUnitPossibleCandidate = false;
|
||||
|
||||
|
Reference in New Issue
Block a user