what about optimization by avoiding config code in update functions:
The simulation uses two typical functions, the config function and the
update function. The config function is called once, the update function is
called again and again while race.
As example have a look to the transmission.cpp.
Here SimTransmissionConfig(tCar *car) is the config function and
SimGearboxUpdate(tCar *car) is an update function.
At start of the update function there are some lines of code, that are
allready used while the call to the config function:
tTransmission *trans = &(car->transmission);
tClutch *clutch = &(trans->clutch);
tGearbox *gearbox = &(trans->gearbox);
tDifferential *differential = NULL;
differential = &(trans->differential[TRANS_REAR_DIFF]);
differential = &(trans->differential[TRANS_FRONT_DIFF]);
differential = &(trans->differential[TRANS_CENTRAL_DIFF]);
This could be stored and reused instead.