mirror of
https://github.com/glest/glest-source.git
synced 2025-09-03 04:52: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);
|
Unit *curUnit = findUnit(iter->second);
|
||||||
if(curUnit != NULL) {
|
if(curUnit != NULL) {
|
||||||
|
|
||||||
bool isUnitPossibleCandidate = true;
|
const CommandType *cmdType = curUnit->getType()->getFirstCtOfClass(cmdClass);
|
||||||
|
bool isUnitPossibleCandidate = (cmdType != NULL);
|
||||||
if(skillClassList.size() > 0) {
|
if(skillClassList.size() > 0) {
|
||||||
isUnitPossibleCandidate = false;
|
isUnitPossibleCandidate = false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user