[#2485] Fix motor mount not hiding
This commit is contained in:
parent
2f524016de
commit
7751faccda
@ -215,6 +215,9 @@ public abstract class RocketRenderer {
|
||||
throw new NullPointerException(" null motor from configuration.getActiveMotors... this is a bug.");
|
||||
}
|
||||
|
||||
if (!((RocketComponent) mount).isVisible()) {
|
||||
continue;
|
||||
}
|
||||
double length = motor.getLength();
|
||||
|
||||
Coordinate[] position = ((RocketComponent) mount).toAbsolute(new Coordinate(((RocketComponent) mount)
|
||||
|
@ -326,6 +326,10 @@ public class RocketFigure extends AbstractScaleFigure {
|
||||
double motorRadius = motor.getDiameter() / 2;
|
||||
RocketComponent mountComponent = ((RocketComponent) mount);
|
||||
|
||||
if (!mountComponent.isVisible()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// <component>.getLocation() will return all the parent instances of this owning component, AND all of it's own instances as well.
|
||||
// so, just draw a motor once for each Coordinate returned...
|
||||
Coordinate[] mountLocations = mount.getLocations();
|
||||
|
Loading…
x
Reference in New Issue
Block a user