From: david Date: Sat, 25 Jan 2003 21:49:57 +0000 (+0000) Subject: Kludge in a /systems/electrical/serviceable master property to kill X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9adaa93b1928a6bb0a5e8a8d8453c35a3909de3f;p=flightgear.git Kludge in a /systems/electrical/serviceable master property to kill the whole electrical system. We will also need a mechanism to kill individual suppliers (such as the alternator), but this is good enough for most training. --- diff --git a/src/Systems/electrical.cxx b/src/Systems/electrical.cxx index 03ed8c9ff..75a1a4fbc 100644 --- a/src/Systems/electrical.cxx +++ b/src/Systems/electrical.cxx @@ -329,7 +329,9 @@ void FGElectricalSystem::propogate( FGElectricalComponent *node, double val, // determine the current to carry forward double current = 0.0; - if ( node->get_kind() == FG_SUPPLIER ) { + if ( !fgGetBool("/systems/electrical/serviceable") ) { + current = 0; + } else if ( node->get_kind() == FG_SUPPLIER ) { // cout << s << " is a supplier" << endl; current = ((FGElectricalSupplier *)node)->get_output(); } else if ( node->get_kind() == FG_BUS ) {