Merge remote-tracking branch 'viadanna/fix/invisible-combat'

This commit is contained in:
Marc Zinnschlag 2014-12-03 15:34:02 +01:00
commit e2efc4770d

View file

@ -325,6 +325,11 @@ namespace MWMechanics
currentAction = prepareNextAction(actor, target); currentAction = prepareNextAction(actor, target);
actionCooldown = currentAction->getActionCooldown(); actionCooldown = currentAction->getActionCooldown();
} }
// Stop attacking if target is not seen
if (!MWBase::Environment::get().getMechanicsManager()->awarenessCheck(target, actor))
return true;
if (currentAction.get()) if (currentAction.get())
currentAction->getCombatRange(rangeAttack, rangeFollow); currentAction->getCombatRange(rangeAttack, rangeFollow);