mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
Rework greeting timeouts (bug #5249)
This commit is contained in:
parent
95f9e4f4c9
commit
a384104f73
2 changed files with 7 additions and 4 deletions
|
@ -192,6 +192,7 @@
|
||||||
Bug #5239: OpenMW-CS does not support non-ASCII characters in path names
|
Bug #5239: OpenMW-CS does not support non-ASCII characters in path names
|
||||||
Bug #5241: On-self absorb spells cannot be detected
|
Bug #5241: On-self absorb spells cannot be detected
|
||||||
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 #5250: Creatures display shield ground mesh instead of shield body part
|
Bug #5250: Creatures display shield ground mesh instead of shield body part
|
||||||
Feature #1774: Handle AvoidNode
|
Feature #1774: Handle AvoidNode
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
|
|
|
@ -143,7 +143,8 @@ void getRestorationPerHourOfSleep (const MWWorld::Ptr& ptr, float& health, float
|
||||||
namespace MWMechanics
|
namespace MWMechanics
|
||||||
{
|
{
|
||||||
static const int GREETING_SHOULD_START = 4; // how many updates should pass before NPC can greet player
|
static const int GREETING_SHOULD_START = 4; // how many updates should pass before NPC can greet player
|
||||||
static const int GREETING_SHOULD_END = 10;
|
static const int GREETING_SHOULD_END = 20; // how many updates should pass before NPC stops turning to player
|
||||||
|
static const int GREETING_COOLDOWN = 40; // how many updates should pass before NPC can continue movement
|
||||||
static const float DECELERATE_DISTANCE = 512.f;
|
static const float DECELERATE_DISTANCE = 512.f;
|
||||||
|
|
||||||
class GetStuntedMagickaDuration : public MWMechanics::EffectSourceVisitor
|
class GetStuntedMagickaDuration : public MWMechanics::EffectSourceVisitor
|
||||||
|
@ -519,9 +520,10 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
greetingTimer++;
|
greetingTimer++;
|
||||||
|
|
||||||
|
if (greetingTimer <= GREETING_SHOULD_END || MWBase::Environment::get().getSoundManager()->sayActive(actor))
|
||||||
turnActorToFacePlayer(actor, dir);
|
turnActorToFacePlayer(actor, dir);
|
||||||
|
|
||||||
if (greetingTimer >= GREETING_SHOULD_END)
|
if (greetingTimer >= GREETING_COOLDOWN)
|
||||||
{
|
{
|
||||||
greetingState = Greet_Done;
|
greetingState = Greet_Done;
|
||||||
greetingTimer = 0;
|
greetingTimer = 0;
|
||||||
|
|
Loading…
Reference in a new issue