mirror of
https://github.com/glest/glest-source.git
synced 2025-09-25 15:09:03 +02:00
Skill can be NULL ....
This commit is contained in:
@@ -2376,7 +2376,7 @@ bool UnitUpdater::unitOnRange(const Unit *unit, int range, Unit **rangedPtr,
|
|||||||
if(unit->getFaction()->getControlType()==ctCpuUltra ||
|
if(unit->getFaction()->getControlType()==ctCpuUltra ||
|
||||||
unit->getFaction()->getControlType()==ctCpuMega) {
|
unit->getFaction()->getControlType()==ctCpuMega) {
|
||||||
if(distToStandingUnit < 0 || currentDist< distToStandingUnit) {
|
if(distToStandingUnit < 0 || currentDist< distToStandingUnit) {
|
||||||
if(enemies[i]->getCurrSkill()->getClass()==scAttack) {
|
if(enemies[i]->getCurrSkill()!=NULL && enemies[i]->getCurrSkill()->getClass()==scAttack) {
|
||||||
distToStandingUnit = currentDist;
|
distToStandingUnit = currentDist;
|
||||||
attackingEnemySeen=enemies[i];
|
attackingEnemySeen=enemies[i];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user