|
|
@ -6,6 +6,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include "../mwdialogue/dialoguemanagerimp.hpp"
|
|
|
|
#include "../mwdialogue/dialoguemanagerimp.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "../mwmechanics/aicombat.hpp"
|
|
|
|
#include "../mwmechanics/aifollow.hpp"
|
|
|
|
#include "../mwmechanics/aifollow.hpp"
|
|
|
|
#include "../mwmechanics/creaturestats.hpp"
|
|
|
|
#include "../mwmechanics/creaturestats.hpp"
|
|
|
|
#include "../mwmechanics/mechanicsmanagerimp.hpp"
|
|
|
|
#include "../mwmechanics/mechanicsmanagerimp.hpp"
|
|
|
@ -240,14 +241,17 @@ void DedicatedActor::setAI()
|
|
|
|
|
|
|
|
|
|
|
|
if (targetPtr)
|
|
|
|
if (targetPtr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (aiAction == mwmp::BaseActorList::FOLLOW)
|
|
|
|
if (aiAction == mwmp::BaseActorList::FOLLOW)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MWMechanics::AiFollow package(targetPtr);
|
|
|
|
MWMechanics::AiFollow package(targetPtr);
|
|
|
|
package.allowAnyDistance(true);
|
|
|
|
package.allowAnyDistance(true);
|
|
|
|
ptr.getClass().getCreatureStats(ptr).getAiSequence().stack(package, ptr, true);
|
|
|
|
ptr.getClass().getCreatureStats(ptr).getAiSequence().stack(package, ptr, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (aiAction == mwmp::BaseActorList::COMBAT)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MWMechanics::AiCombat package(targetPtr);
|
|
|
|
|
|
|
|
ptr.getClass().getCreatureStats(ptr).getAiSequence().stack(package, ptr, true);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|