mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +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
|
// SMSG_POWER_UPDATE
|
||||||
|
|
||||||
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
|
// 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);
|
m_movementInfo.AddMovementFlag(MOVEFLAG_FLYING);
|
||||||
|
|
||||||
SetMover(this);
|
SetMover(this);
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ void HostileReference::updateOnlineStatus()
|
||||||
// target is not in flight
|
// target is not in flight
|
||||||
if(isValid() &&
|
if(isValid() &&
|
||||||
((getTarget()->GetTypeId() != TYPEID_PLAYER || !((Player*)getTarget())->isGameMaster()) ||
|
((getTarget()->GetTypeId() != TYPEID_PLAYER || !((Player*)getTarget())->isGameMaster()) ||
|
||||||
!getTarget()->hasUnitState(UNIT_STAT_TAXI_FLIGHT)))
|
!getTarget()->IsTaxiFlying()))
|
||||||
{
|
{
|
||||||
Creature* creature = (Creature* ) getSourceUnit();
|
Creature* creature = (Creature* ) getSourceUnit();
|
||||||
online = getTarget()->isInAccessablePlaceFor(creature);
|
online = getTarget()->isInAccessablePlaceFor(creature);
|
||||||
|
|
|
||||||
|
|
@ -91,10 +91,12 @@ inline float Traveller<Creature>::GetMoveDestinationTo(float x, float y, float z
|
||||||
{
|
{
|
||||||
float dx = x - GetPositionX();
|
float dx = x - GetPositionX();
|
||||||
float dy = y - GetPositionY();
|
float dy = y - GetPositionY();
|
||||||
float dz = z - GetPositionZ();
|
|
||||||
|
|
||||||
if(i_traveller.hasUnitState(UNIT_STAT_TAXI_FLIGHT))
|
if(i_traveller.hasUnitState(UNIT_STAT_TAXI_FLIGHT))
|
||||||
|
{
|
||||||
|
float dz = z - GetPositionZ();
|
||||||
return sqrt((dx*dx) + (dy*dy) + (dz*dz));
|
return sqrt((dx*dx) + (dy*dy) + (dz*dz));
|
||||||
|
}
|
||||||
else //Walking on the ground
|
else //Walking on the ground
|
||||||
return sqrt((dx*dx) + (dy*dy));
|
return sqrt((dx*dx) + (dy*dy));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10228"
|
#define REVISION_NR "10229"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue