Esempio n. 1
0
void
SimShutdown(void)
{
    tCar *car;
    int	 ncar;

    SimCarCollideShutdown(SimNbCars);
    if (SimCarTable) {
	for (ncar = 0; ncar < SimNbCars; ncar++) {
	    car = &(SimCarTable[ncar]);
	    SimEngineShutdown(car);
	}
	free(SimCarTable);
	SimCarTable = 0;
    }

	PTrack = 0;
}
Esempio n. 2
0
void
SimShutdown(void)
{
    tCar *car;
    int	 ncar;
#if 0
	double elapsed_time = GfTimeClock() - simu_init_time;
	printf ("delta_time: %f\n", SimDeltaTime);
	printf ("simu time: %fs (%f%% of %fs)\n", simu_total_time,
			100.0f * simu_total_time/elapsed_time, elapsed_time);
	printf ("\
			 timer_coordinate_transform:%f\n\
			 timer_reaction:%f\n\
			 timer_angles:%f\n\
			 timer_friction:%f\n\
			 timer_temperature:%f\n\
			 timer_force_calculation:%f\n\
			 timer_wheel_to_car:%f\n\
			 access_times:%f\n",
			 timer_coordinate_transform,
			 timer_reaction,
			 timer_angles,
			 timer_friction,
			 timer_temperature,
			 timer_force_calculation,
			timer_wheel_to_car,
			access_times);
#endif
    SimCarCollideShutdown(SimNbCars);
    if (SimCarTable) {
		for (ncar = 0; ncar < SimNbCars; ncar++) {
			car = &(SimCarTable[ncar]);
			delete car->options;
			SimEngineShutdown(car);
		}
		free(SimCarTable);
		SimCarTable = 0;
    }
}