Exemplo n.º 1
0
void
TaskAutoPilot::Start(const TaskAccessor& task)
{
    // construct list of places we will fly to.
    // we dont do this dynamically so it is remembered even if
    // the task is advanced/retreated.

    if (task.is_ordered()) {
        // construct list

        // this pilot is inaccurate, he flies to a random point in the OZ,
        // and starts in the start OZ.

        w[1] = task.random_oz_point(0, parms.target_noise);
        w[0] = task.random_oz_point(1, parms.target_noise);

    } else {
        // for non-ordered tasks, start at the default location

        w[1] = location_start;
        if (task.is_empty()) {
            // go somewhere nearby
            w[0] = location_previous;
        } else {
            // go directly to the target
            w[0] = task.random_oz_point(0, parms.target_noise);
        }
    }

    // pick up the locations from the task to be used to initialise
    // the aircraft simulator

    location_start = get_start_location(task);
    location_previous = get_start_location(task, false);

    awp= 0;

    // reset the heading
    heading = Angle::Zero();
    heading_filt.Reset(fixed_zero);

    acstate = Cruise;
}
Exemplo n.º 2
0
/**
 * リスタート時の処理
 *
 */
void Girl::restart()
{
	ActiveObject::restart();

	set_angular_factor( 0 );
	set_friction( 0 );

	mode_ = MODE_STAND;

	play_animation( "Stand", true, true );

	flicker_base_location_ = get_start_location();
}