[svn] Check creature combat reach when loading db. This should fix the bug that finding random contact point causes crash.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2008-11-01 16:53:16 -05:00
1 parent d292b85d38
commit 37d0fdd0cd
4 files changed
+20 -8

No files matched your search

+1 -1
View File
@@ -164,7 +164,7 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
if (owner.GetObjectSize())
i_destinationHolder.ResetUpdate(50);
float dist = owner.GetFloatValue(UNIT_FIELD_COMBATREACH) + i_target.getTarget()->GetFloatValue(UNIT_FIELD_COMBATREACH) + sWorld.getRate(RATE_TARGET_POS_RECALCULATION_RANGE);
float dist = owner.GetCombatReach() + i_target.getTarget()->GetCombatReach() + sWorld.getRate(RATE_TARGET_POS_RECALCULATION_RANGE);
//More distance let have better performance, less distance let have more sensitive reaction at target move.