From 9adaa93b1928a6bb0a5e8a8d8453c35a3909de3f Mon Sep 17 00:00:00 2001 From: david Date: Sat, 25 Jan 2003 21:49:57 +0000 Subject: [PATCH] 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. --- src/Systems/electrical.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ) { -- 2.39.5