Make the microai use actions instead of orders.

Based on a patch by per. Refs #2391.
master
cybersphinx 2011-05-15 00:05:52 +02:00
parent 37012d975c
commit 54a1771b64
1 changed files with 3 additions and 3 deletions

View File

@ -1029,7 +1029,7 @@ static bool updateAttackTarget(BASE_OBJECT * psAttacker, SDWORD weapon_slot)
orderState(psDroid, DORDER_ATTACKTARGET)) &&
weapon_slot == 0) //Watermelon:only primary slot(0) updates affect order
{
orderDroidObj((DROID *)psAttacker, DORDER_ATTACKTARGET, psBetterTarget, ModeImmediate);
actionDroid((DROID *)psAttacker, DACTION_ATTACK, psBetterTarget);
}
else //can't override current order
{
@ -1179,14 +1179,14 @@ void aiUpdateDroid(DROID *psDroid)
{
if (aiChooseSensorTarget((BASE_OBJECT *)psDroid, &psTarget))
{
orderDroidObj(psDroid, DORDER_OBSERVE, psTarget, ModeImmediate);
actionDroid(psDroid, DACTION_OBSERVE, psTarget);
}
}
else
{
if (aiChooseTarget((BASE_OBJECT *)psDroid, &psTarget, 0, true, NULL))
{
orderDroidObj(psDroid, DORDER_ATTACKTARGET, psTarget, ModeImmediate);
actionDroid(psDroid, DACTION_ATTACK, psTarget);
}
}
}