From b1159869512bf0615ecda29d99281641f1775387 Mon Sep 17 00:00:00 2001 From: Ambal Date: Thu, 14 Apr 2011 01:41:34 +0300 Subject: [PATCH] [11347] More accurate calculation of next movement update time in RandomMovementGenerator::_setRandomLocation() Signed-off-by: Ambal --- src/game/RandomMovementGenerator.cpp | 2 +- src/shared/revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/RandomMovementGenerator.cpp b/src/game/RandomMovementGenerator.cpp index 141b8b4f9..2dc92ff1f 100644 --- a/src/game/RandomMovementGenerator.cpp +++ b/src/game/RandomMovementGenerator.cpp @@ -105,7 +105,7 @@ RandomMovementGenerator::_setRandomLocation(Creature &creature) //else if (is_water_ok) // Swimming mode to be done with more than this check else { - i_nextMoveTime.Reset(urand(500+i_destinationHolder.GetTotalTravelTime(), 10000+i_destinationHolder.GetTotalTravelTime())); + i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime() + urand(500, 10000)); creature.AddSplineFlag(SPLINEFLAG_WALKMODE); } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c7cf81459..0c6d1f296 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11346" + #define REVISION_NR "11347" #endif // __REVISION_NR_H__