mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9445] Possible fix often crashes in waypoint movegen.
Thanks to DrKLO for research source of problem!
This commit is contained in:
parent
24f2d4658f
commit
87b08b4fa1
8 changed files with 35 additions and 8 deletions
|
|
@ -117,9 +117,12 @@ bool ConfusedMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
|||
// currently moving, update location
|
||||
unit.addUnitState(UNIT_STAT_CONFUSED_MOVE);
|
||||
Traveller<T> traveller(unit);
|
||||
if( i_destinationHolder.UpdateTraveller(traveller, diff, false))
|
||||
if (i_destinationHolder.UpdateTraveller(traveller, diff, false))
|
||||
{
|
||||
if( i_destinationHolder.HasArrived())
|
||||
if (!IsActive(unit)) // force stop processing (movement can move out active zone with cleanup movegens list)
|
||||
return true; // not expire now, but already lost
|
||||
|
||||
if (i_destinationHolder.HasArrived())
|
||||
{
|
||||
// arrived, stop and wait a bit
|
||||
unit.StopMoving();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue