mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 10:39:42 +00:00
Merge branch 'pursue' into 'master'
AIPursue: Pursue the player until LOS is established (#5869) Closes #5869 See merge request OpenMW/openmw!634
This commit is contained in:
commit
c9d3da498a
2 changed files with 8 additions and 2 deletions
|
@ -103,6 +103,7 @@
|
|||
Bug #5838: Local map and other menus become blank in some locations while playing Wizards' Islands mod.
|
||||
Bug #5840: GetSoundPlaying "Health Damage" doesn't play when NPC hits target with shield effect ( vanilla engine behavior )
|
||||
Bug #5841: Can't Cast Zero Cost Spells When Magicka is < 0
|
||||
Bug #5869: Guards can initiate arrest dialogue behind locked doors
|
||||
Bug #5871: The console appears if you type the Russian letter "Ё" in the name of the enchantment
|
||||
Bug #5877: Effects appearing with empty icon
|
||||
Feature #390: 3rd person look "over the shoulder"
|
||||
|
|
|
@ -53,9 +53,14 @@ bool AiPursue::execute (const MWWorld::Ptr& actor, CharacterController& characte
|
|||
|
||||
const float pathTolerance = 100.f;
|
||||
|
||||
if (pathTo(actor, dest, duration, pathTolerance) &&
|
||||
std::abs(dest.z() - actorPos.z()) < pathTolerance) // check the true distance in case the target is far away in Z-direction
|
||||
// check the true distance in case the target is far away in Z-direction
|
||||
bool reached = pathTo(actor, dest, duration, pathTolerance) &&
|
||||
std::abs(dest.z() - actorPos.z()) < pathTolerance;
|
||||
|
||||
if (reached)
|
||||
{
|
||||
if (!MWBase::Environment::get().getWorld()->getLOS(target, actor))
|
||||
return false;
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Dialogue, actor); //Arrest player when reached
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue