1
0
Fork 0

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.
This commit is contained in:
david 2003-01-25 21:49:57 +00:00
parent 25387150c4
commit 9adaa93b19

View 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 ) {