*Fix the bug that player get fall damage after taxi flight.
--HG-- branch : trunk
This commit is contained in:
@@ -251,6 +251,7 @@ void FlightPathMovementGenerator::Initialize(Player &player)
|
|||||||
player.getHostilRefManager().setOnlineOfflineState(false);
|
player.getHostilRefManager().setOnlineOfflineState(false);
|
||||||
player.addUnitState(UNIT_STAT_IN_FLIGHT);
|
player.addUnitState(UNIT_STAT_IN_FLIGHT);
|
||||||
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
|
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
|
||||||
|
player.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
LoadPath(player);
|
LoadPath(player);
|
||||||
Traveller<Player> traveller(player);
|
Traveller<Player> traveller(player);
|
||||||
// do not send movement, it was sent already
|
// do not send movement, it was sent already
|
||||||
@@ -270,6 +271,7 @@ void FlightPathMovementGenerator::Finalize(Player & player)
|
|||||||
|
|
||||||
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);
|
||||||
|
player.RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
|
|
||||||
if(player.m_taxi.empty())
|
if(player.m_taxi.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user