Esempio n. 1
0
void MotionMaster::MoveCharge(PathGenerator path, float speed, uint32 id)
{
    Vector3 dest = path.GetActualEndPosition();

    MoveCharge(dest.x, dest.y, dest.z, speed, id);

    Movement::MoveSplineInit init(_owner);
    init.MovebyPath(path.GetPath());
    init.SetVelocity(speed);
    init.Launch();
}
void MotionMaster::MoveCharge(PathGenerator const& path, float speed /*= SPEED_CHARGE*/)
{
    G3D::Vector3 dest = path.GetActualEndPosition();

    MoveCharge(dest.x, dest.y, dest.z, speed, EVENT_CHARGE_PREPATH);

    // Charge movement is not started when using EVENT_CHARGE_PREPATH
    Movement::MoveSplineInit init(_owner);
    init.MovebyPath(path.GetPath());
    init.SetVelocity(speed);
    init.Launch();
}
Esempio n. 3
0
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);
}