From 5a79c210cdff654a14d334638f7775d80bf83ed1 Mon Sep 17 00:00:00 2001 From: Kevin Ruland Date: Thu, 24 Mar 2016 17:34:13 -0500 Subject: [PATCH] Fix the test for recovery deplyed under thrust. --- .../openrocket/simulation/BasicEventSimulationEngine.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java index 41c7b155d..ddabdb146 100644 --- a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java +++ b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java @@ -440,12 +440,10 @@ public class BasicEventSimulationEngine implements SimulationEngine { // TODO: HIGH: Check stage activeness for other events as well? // Check whether any motor in the active stages is active anymore - Collection activeMotors = currentStatus.getConfiguration().getActiveMotors(); - for (MotorConfiguration curMotor : activeMotors) { - RocketComponent comp = ((RocketComponent) curMotor.getMount()); - int stageNumber = comp.getStageNumber(); - if (!currentStatus.getConfiguration().isStageActive(stageNumber)) + for (MotorClusterState state : currentStatus.getActiveMotors() ) { + if ( state.isSpent() ) { continue; + } currentStatus.getWarnings().add(Warning.RECOVERY_DEPLOYMENT_WHILE_BURNING); }