void MotionMaster::MoveFall(float z, uint32 id) { i_owner->SetFlying(false); i_owner->SendMovementFlagUpdate(); //AddUnitMovementFlag(MOVEMENTFLAG_FALLING); MoveCharge(i_owner->GetPositionX(), i_owner->GetPositionY(), z, SPEED_CHARGE, id); }
void MotionMaster::MoveFall(float z, uint32 id) //TODO: FIX ME!! should not receive z parameter but calculate it! { i_owner->SetFlying(false); i_owner->SendMovementFlagUpdate(); //AddUnitMovementFlag(MOVEMENTFLAG_FALLING); MoveCharge(i_owner->GetPositionX(), i_owner->GetPositionY(), z, SPEED_CHARGE, id); }
void MotionMaster::MoveFall(float z, uint32 id) { i_owner->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02); i_owner->m_movementInfo.RemoveMovementFlag(MovementFlags(MOVEFLAG_CAN_FLY | MOVEFLAG_FLYING)); i_owner->SetFacingTo(i_owner->GetOrientation()); //AddUnitMovementFlag(MOVEMENTFLAG_FALLING); MoveCharge(i_owner->GetPositionX(), i_owner->GetPositionY(), z, 3.0f, id); }
void MotionMaster::MoveCharge(PathFinderMovementGenerator path, float speed, uint32 id) { Vector3 dest = path.getActualEndPosition(); MoveCharge(dest.x, dest.y, dest.z); Movement::MoveSplineInit init(*_owner); init.MovebyPath(path.getPath()); init.SetVelocity(speed); init.Launch(); }
void MotionMaster::MoveCharge(PathFinder path, float speed /*= SPEED_CHARGE*/) { G3D::Vector3 dest = path.getEndPosition(); MoveCharge(dest.x, dest.y, dest.z, speed, EVENT_CHARGE_PREPATH); // Charge movement is not started when using EVENT_CHARGE_PREPATH Movement::MoveSplineInit init(*m_owner); init.MovebyPath(path.getPath()); init.SetVelocity(speed); init.Launch(); }
void MotionMaster::MoveCharge(PathGenerator const& path) { Vector3 dest = path.GetActualEndPosition(); MoveCharge(dest.x, dest.y, dest.z, SPEED_CHARGE, EVENT_CHARGE_PREPATH); // Charge movement is not started when using EVENT_CHARGE_PREPATH Movement::MoveSplineInit init(_owner); init.MovebyPath(path.GetPath()); init.SetVelocity(SPEED_CHARGE); init.Launch(); }
void MotionMaster::MoveCharge(PathGenerator const& path) { Vector3 dest = path.GetActualEndPosition(); MoveCharge(dest.x, dest.y, dest.z, SPEED_CHARGE, EVENT_CHARGE_PREPATH); // Charge movement is not started when using EVENT_CHARGE_PREPATH int32 timerToDestination = 0; Movement::MoveSplineInit init(_owner); init.MovebyPath(path.GetPath()); init.SetVelocity(SPEED_CHARGE); timerToDestination = init.Launch(); if (_owner->ToPlayer()) _owner->ToPlayer()->SetJumpTimerDestination(timerToDestination + 100); }