*Fix a crash caused by possessed creatures. Thanks to Amit86
--HG-- branch : trunk
This commit is contained in:
@@ -278,16 +278,6 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||||||
movementInfo.t_seat = -1;
|
movementInfo.t_seat = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
|
|
||||||
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
|
|
||||||
plMover->HandleFall(movementInfo);
|
|
||||||
|
|
||||||
if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
|
|
||||||
{
|
|
||||||
// now client not include swimming flag in case jumping under water
|
|
||||||
plMover->SetInWater( !plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.x, movementInfo.y, movementInfo.z) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------*/
|
/*----------------------*/
|
||||||
|
|
||||||
/* process position-change */
|
/* process position-change */
|
||||||
@@ -341,11 +331,18 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||||||
}
|
}
|
||||||
else // creature charmed
|
else // creature charmed
|
||||||
{
|
{
|
||||||
if(Map *map = mover->GetMap())
|
mover->GetMap()->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
||||||
{
|
|
||||||
map->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
|
||||||
}
|
}
|
||||||
mover->SetUnitMovementFlags(movementInfo.flags);
|
|
||||||
|
// Aura removal may remove mover
|
||||||
|
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
|
||||||
|
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
|
||||||
|
plMover->HandleFall(movementInfo);
|
||||||
|
|
||||||
|
if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
|
||||||
|
{
|
||||||
|
// now client not include swimming flag in case jumping under water
|
||||||
|
plMover->SetInWater( !plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.x, movementInfo.y, movementInfo.z) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user