Skip to content

Commit

Permalink
[10229] Small cleanup in taxi related checks
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirMangos committed Jul 19, 2010
1 parent 2134e71 commit b7ba639
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/game/Player.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/game/ThreatManager.cpp
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/game/Traveller.h
Expand Up @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10228"
#define REVISION_NR "10229"
#endif // __REVISION_NR_H__

0 comments on commit b7ba639

Please sign in to comment.