1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-21 11:09:41 +00:00

reduce "reset if stuck" AiWander timeout.

Now is about 14 seconds, instead of 300.
This commit is contained in:
dteviot 2015-08-30 16:43:35 +12:00
parent 39c2ba8efe
commit 1dfe438a5d

View file

@ -27,7 +27,7 @@
namespace MWMechanics namespace MWMechanics
{ {
static const int COUNT_BEFORE_RESET = 200; // TODO: maybe no longer needed static const int COUNT_BEFORE_RESET = 10;
static const float DOOR_CHECK_INTERVAL = 1.5f; static const float DOOR_CHECK_INTERVAL = 1.5f;
static const float REACTION_INTERVAL = 0.25f; static const float REACTION_INTERVAL = 0.25f;
static const int GREETING_SHOULD_START = 4; //how many reaction intervals should pass before NPC can greet player static const int GREETING_SHOULD_START = 4; //how many reaction intervals should pass before NPC can greet player
@ -443,8 +443,8 @@ namespace MWMechanics
{ {
movement.mPosition[1] = 1; movement.mPosition[1] = 1;
} }
//#if 0
// TODO: maybe no longer needed // if stuck for sufficiently long, act like current location was the destination
if (mStuckCount >= COUNT_BEFORE_RESET) // something has gone wrong, reset if (mStuckCount >= COUNT_BEFORE_RESET) // something has gone wrong, reset
{ {
//std::cout << "Reset \""<< cls.getName(actor) << "\"" << std::endl; //std::cout << "Reset \""<< cls.getName(actor) << "\"" << std::endl;
@ -454,7 +454,6 @@ namespace MWMechanics
storage.mState = Wander_ChooseAction; storage.mState = Wander_ChooseAction;
mStuckCount = 0; mStuckCount = 0;
} }
//#endif
} }
void AiWander::playIdleDialogueRandomly(const MWWorld::Ptr& actor) void AiWander::playIdleDialogueRandomly(const MWWorld::Ptr& actor)