mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-02 03:45:32 +00:00
Merge pull request #2664 from akortunov/greeting
Rework greeting timeouts
This commit is contained in:
commit
be85159095
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
|
||||||
|
|
|
@ -142,8 +142,9 @@ 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++;
|
||||||
|
|
||||||
turnActorToFacePlayer(actor, dir);
|
if (greetingTimer <= GREETING_SHOULD_END || MWBase::Environment::get().getSoundManager()->sayActive(actor))
|
||||||
|
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