forked from mirror/openmw-tes3mp
AI tell their greatings even when player is moving (like morrowind).
Greating reset distance was greatly inflated comparing with morrowind.
This commit is contained in:
parent
0032426817
commit
20efeea5d9
1 changed files with 2 additions and 4 deletions
|
@ -454,9 +454,7 @@ namespace MWMechanics
|
|||
if (!mSaidGreeting)
|
||||
{
|
||||
// TODO: check if actor is aware / has line of sight
|
||||
if (playerDistSqr <= helloDistance*helloDistance
|
||||
// Only play a greeting if the player is not moving
|
||||
&& Ogre::Vector3(player.getClass().getMovementSettings(player).mPosition).squaredLength() == 0)
|
||||
if (playerDistSqr <= helloDistance*helloDistance)
|
||||
{
|
||||
mSaidGreeting = true;
|
||||
MWBase::Environment::get().getDialogueManager()->say(actor, "hello");
|
||||
|
@ -467,7 +465,7 @@ namespace MWMechanics
|
|||
static float fGreetDistanceReset = MWBase::Environment::get().getWorld()->getStore()
|
||||
.get<ESM::GameSetting>().find("fGreetDistanceReset")->getFloat();
|
||||
|
||||
if (playerDistSqr >= fGreetDistanceReset*fGreetDistanceReset * iGreetDistanceMultiplier*iGreetDistanceMultiplier)
|
||||
if (playerDistSqr >= fGreetDistanceReset*fGreetDistanceReset)
|
||||
mSaidGreeting = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue