setFixedTurnRadius(scFileNode->getDoubleValue("fixed-turn-radius-ft", 500));
setSpeedConstant(scFileNode->getDoubleValue("speed-constant", 0.5));
setSMPath(scFileNode->getStringValue("submodel-path", ""));
+ setRollFactor(scFileNode->getDoubleValue("roll-factor", 1));
if (!flightplan.empty()) {
SG_LOG(SG_AI, SG_ALERT, "getting flightplan: " << _name );
}
bool FGAIShip::init(bool search_in_AI_path) {
+ reinit();
+ return FGAIBase::init(search_in_AI_path);
+}
+
+void FGAIShip::reinit()
+{
prev = 0; // the one behind you
curr = 0; // the one ahead
next = 0; // the next plus 1
if (fp)
_fp_init = initFlightPlan();
- return FGAIBase::init(search_in_AI_path);
+ FGAIBase::reinit();
}
void FGAIShip::bind() {
_fixed_turn_radius = ftr;
}
+void FGAIShip::setRollFactor(double rf) {
+ _roll_factor = rf * -0.0083335;
+}
+
void FGAIShip::setInitialTunnel(bool t) {
_initial_tunnel = t;
setTunnel(_initial_tunnel);