mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10064] Fixed recently show up crash in Unit::StopMoving.
This commit is contained in:
parent
5b15cd5dd2
commit
0304448b85
3 changed files with 9 additions and 2 deletions
|
|
@ -40,8 +40,11 @@ inline bool isStatic(MovementGenerator *mv)
|
|||
void
|
||||
MotionMaster::Initialize()
|
||||
{
|
||||
// stop current move
|
||||
if (!i_owner->IsStopped())
|
||||
i_owner->StopMoving();
|
||||
|
||||
// clear ALL movement generators (including default)
|
||||
i_owner->StopMoving();
|
||||
Clear(false,true);
|
||||
|
||||
// set new default movement generator
|
||||
|
|
|
|||
|
|
@ -12777,6 +12777,10 @@ void Unit::StopMoving()
|
|||
{
|
||||
clearUnitState(UNIT_STAT_MOVING);
|
||||
|
||||
// not need send any packets if not in world
|
||||
if (!IsInWorld())
|
||||
return;
|
||||
|
||||
// send explicit stop packet
|
||||
// player expected for correct work SPLINEFLAG_WALKMODE
|
||||
SendMonsterMove(GetPositionX(), GetPositionY(), GetPositionZ(), SPLINETYPE_NORMAL, GetTypeId() == TYPEID_PLAYER ? SPLINEFLAG_WALKMODE : SPLINEFLAG_NONE, 0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10063"
|
||||
#define REVISION_NR "10064"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue