mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7480] Clear flight flag early for safe.
This commit is contained in:
parent
6f51fbece9
commit
b1e712f32f
3 changed files with 4 additions and 4 deletions
|
|
@ -92,8 +92,6 @@ template<class T>
|
||||||
void
|
void
|
||||||
TargetedMovementGenerator<T>::Initialize(T &owner)
|
TargetedMovementGenerator<T>::Initialize(T &owner)
|
||||||
{
|
{
|
||||||
if(!&owner)
|
|
||||||
return;
|
|
||||||
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
|
|
||||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||||
|
|
|
||||||
|
|
@ -245,11 +245,13 @@ void FlightPathMovementGenerator::Initialize(Player &player)
|
||||||
|
|
||||||
void FlightPathMovementGenerator::Finalize(Player & player)
|
void FlightPathMovementGenerator::Finalize(Player & player)
|
||||||
{
|
{
|
||||||
|
// remove flag to prevent send object build movement packets for flight state and crash (movement generator already not at top of stack)
|
||||||
|
player.clearUnitState(UNIT_STAT_IN_FLIGHT);
|
||||||
|
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
i_destinationHolder.GetLocationNow(player.GetMapId(), x, y, z);
|
i_destinationHolder.GetLocationNow(player.GetMapId(), x, y, z);
|
||||||
player.SetPosition(x, y, z, player.GetOrientation());
|
player.SetPosition(x, y, z, player.GetOrientation());
|
||||||
|
|
||||||
player.clearUnitState(UNIT_STAT_IN_FLIGHT);
|
|
||||||
player.Unmount();
|
player.Unmount();
|
||||||
player.RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
|
player.RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7479"
|
#define REVISION_NR "7480"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue