Remove incorrect implementation of fGreetDistanceReset

This can't be right. A reset distance of 512 is smaller than the maximum greeting distance for certain NPCs, which would then say greetings non-stop.
openmw-35
scrawl 10 years ago
parent 716e14a37a
commit b108fbe986

@ -477,10 +477,8 @@ namespace MWMechanics
if (greetingState == MWMechanics::AiWander::Greet_Done) if (greetingState == MWMechanics::AiWander::Greet_Done)
{ {
static float fGreetDistanceReset = MWBase::Environment::get().getWorld()->getStore() float resetDist = 2*helloDistance;
.get<ESM::GameSetting>().find("fGreetDistanceReset")->getFloat(); if (playerDistSqr >= resetDist*resetDist)
if (playerDistSqr >= fGreetDistanceReset*fGreetDistanceReset)
greetingState = Greet_None; greetingState = Greet_None;
} }
} }

Loading…
Cancel
Save