mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
Make GetTarget return 1 during actor greeting (bug #5255)
This commit is contained in:
parent
8bfca9830f
commit
a2c674bb2e
2 changed files with 10 additions and 0 deletions
|
@ -194,6 +194,7 @@
|
||||||
Bug #5242: ExplodeSpell behavior differs from Cast behavior
|
Bug #5242: ExplodeSpell behavior differs from Cast behavior
|
||||||
Bug #5249: Wandering NPCs start walking too soon after they hello
|
Bug #5249: Wandering NPCs start walking too soon after they hello
|
||||||
Bug #5250: Creatures display shield ground mesh instead of shield body part
|
Bug #5250: Creatures display shield ground mesh instead of shield body part
|
||||||
|
Bug #5255: "GetTarget, player" doesn't return 1 during NPC hello
|
||||||
Feature #1774: Handle AvoidNode
|
Feature #1774: Handle AvoidNode
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
Feature #3025: Analogue gamepad movement controls
|
Feature #3025: Analogue gamepad movement controls
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/mechanicsmanager.hpp"
|
#include "../mwbase/mechanicsmanager.hpp"
|
||||||
|
#include "../mwbase/soundmanager.hpp"
|
||||||
|
|
||||||
#include "interpretercontext.hpp"
|
#include "interpretercontext.hpp"
|
||||||
#include "ref.hpp"
|
#include "ref.hpp"
|
||||||
|
@ -435,6 +436,14 @@ namespace MWScript
|
||||||
if (!targetPtr.isEmpty() && targetPtr.getCellRef().getRefId() == testedTargetId)
|
if (!targetPtr.isEmpty() && targetPtr.getCellRef().getRefId() == testedTargetId)
|
||||||
targetsAreEqual = true;
|
targetsAreEqual = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool turningToPlayer = creatureStats.isTurningToPlayer();
|
||||||
|
bool greeting = creatureStats.getGreetingState() == MWMechanics::Greet_InProgress;
|
||||||
|
bool sayActive = MWBase::Environment::get().getSoundManager()->sayActive(actor);
|
||||||
|
if (turningToPlayer || (greeting && sayActive))
|
||||||
|
targetsAreEqual = (testedTargetId == "player"); // Currently the player ID is hardcoded
|
||||||
|
}
|
||||||
runtime.push(int(targetsAreEqual));
|
runtime.push(int(targetsAreEqual));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue