446 {
448
450 {
451 player->ExitVehicle();
452 player->DisableSpline();
454
455 float dist = position->
GetExactDist2d(player->GetPositionX(), player->GetPositionY());
457 float speedZ = std::max(10.0f, float(50.0f * std::sin(elevation)));
458 float speedXY = dist * 10.0f / speedZ;
459
461 }
462 }
float GetExactDist2d(const float x, const float y) const
Definition: Position.h:166
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Position.h:251
float GetElevation() const
Definition: Spell.h:168
SpellCastTargets m_targets
Definition: Spell.h:527
WorldLocation const * GetExplTargetDest()
Definition: SpellScript.cpp:416
Spell * GetSpell()
Definition: SpellScript.h:442
Unit * GetCaster()
Definition: SpellScript.cpp:401