Skip to content

Commit

Permalink
Don't let Nullbot non-sensors observe objects.
Browse files Browse the repository at this point in the history
Scouts instead of observing.
  • Loading branch information
KJeff01 committed Apr 10, 2019
1 parent 4d34963 commit 4b97f42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/mp/multiplay/skirmish/nb_includes/tactics.js
Expand Up @@ -231,12 +231,14 @@ function attackTarget(droid) {
if (defined(target))
switch (target.type) {
case DROID:
if (droid.canHitGround === true && !isVTOL(target))
if (droid.droidType === DROID_SENSOR)
orderDroidObj(droid, DORDER_OBSERVE, target);
else if (droid.canHitGround === true && !isVTOL(target))
orderDroidObj(droid, DORDER_ATTACK, target);
else if(droid.canHitAir === true && isVTOL(target))
orderDroidObj(droid, DORDER_ATTACK, target);
else
orderDroidObj(droid, DORDER_OBSERVE, target);
orderDroidLoc(droid, DORDER_SCOUT, target.x, target.y);
break;
case FEATURE:
orderDroidObj(droid, DORDER_RECOVER, target);
Expand Down

0 comments on commit 4b97f42

Please sign in to comment.