From 513e99148e135fbf60309db718b3853d12898918 Mon Sep 17 00:00:00 2001 From: James Carty Date: Fri, 17 Aug 2018 20:17:26 +0100 Subject: [PATCH] Fix function with no return value --- apps/openmw/mwmechanics/aisequence.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/aisequence.cpp b/apps/openmw/mwmechanics/aisequence.cpp index d55ba13dd8..9a42168d63 100644 --- a/apps/openmw/mwmechanics/aisequence.cpp +++ b/apps/openmw/mwmechanics/aisequence.cpp @@ -125,16 +125,16 @@ bool AiSequence::isInCombat() const bool AiSequence::isEngagedWithActor() const { - bool isFightingNpc = false; for (std::list::const_iterator it = mPackages.begin(); it != mPackages.end(); ++it) { if ((*it)->getTypeId() == AiPackage::TypeIdCombat) { MWWorld::Ptr target2 = (*it)->getTarget(); if (!target2.isEmpty() && target2.getClass().isNpc()) - isFightingNpc = true; + return true; } } + return false; } bool AiSequence::hasPackage(int typeId) const