]> git.mxchange.org Git - flightgear.git/commitdiff
Kludge in a /systems/electrical/serviceable master property to kill
authordavid <david>
Sat, 25 Jan 2003 21:49:57 +0000 (21:49 +0000)
committerdavid <david>
Sat, 25 Jan 2003 21:49:57 +0000 (21:49 +0000)
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

index 03ed8c9ffafe2d02ec9e7714fc14a96d3d642a92..75a1a4fbcda8a8441063f19c58c644d486d3ee5f 100644 (file)
@@ -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 ) {