mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[10229] Small cleanup in taxi related checks
This commit is contained in:
parent
6b0746b49b
commit
9381e8680c
4 changed files with 6 additions and 4 deletions
|
|
@ -19469,7 +19469,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||
// SMSG_POWER_UPDATE
|
||||
|
||||
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
|
||||
if(HasAuraType(SPELL_AURA_MOD_FLIGHT_SPEED_MOUNTED) || HasAuraType(SPELL_AURA_FLY) || IsTaxiFlying())
|
||||
if (IsFreeFlying() || IsTaxiFlying())
|
||||
m_movementInfo.AddMovementFlag(MOVEFLAG_FLYING);
|
||||
|
||||
SetMover(this);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ void HostileReference::updateOnlineStatus()
|
|||
// target is not in flight
|
||||
if(isValid() &&
|
||||
((getTarget()->GetTypeId() != TYPEID_PLAYER || !((Player*)getTarget())->isGameMaster()) ||
|
||||
!getTarget()->hasUnitState(UNIT_STAT_TAXI_FLIGHT)))
|
||||
!getTarget()->IsTaxiFlying()))
|
||||
{
|
||||
Creature* creature = (Creature* ) getSourceUnit();
|
||||
online = getTarget()->isInAccessablePlaceFor(creature);
|
||||
|
|
|
|||
|
|
@ -91,10 +91,12 @@ inline float Traveller<Creature>::GetMoveDestinationTo(float x, float y, float z
|
|||
{
|
||||
float dx = x - GetPositionX();
|
||||
float dy = y - GetPositionY();
|
||||
float dz = z - GetPositionZ();
|
||||
|
||||
if(i_traveller.hasUnitState(UNIT_STAT_TAXI_FLIGHT))
|
||||
{
|
||||
float dz = z - GetPositionZ();
|
||||
return sqrt((dx*dx) + (dy*dy) + (dz*dz));
|
||||
}
|
||||
else //Walking on the ground
|
||||
return sqrt((dx*dx) + (dy*dy));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10228"
|
||||
#define REVISION_NR "10229"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue