private void updateShielding() { if (!shieldsParts) { return; } SSTUAirstreamShield shield = part.GetComponent <SSTUAirstreamShield>(); if (shield != null) { shield.addShieldArea("ISDC-Shielding", currentTopDiameter * 0.5f, currentTopDiameter * 0.5f, currentHeight * 0.5f, -currentHeight * 0.5f, true, true); } }
private void updateAirstreamShield() { SSTUAirstreamShield shield = part.GetComponent <SSTUAirstreamShield>(); if (shield == null) { return; } //only care about the cargo-bay models for this setup //the fairing module should take care of its own airstream shielding setup //TODO - set the fairing module to auto-set the shielding dimensions on fairing dimension changes... if (currentNoseModule.hasAnimation() && noseAnimControl.animationState == AnimState.STOPPED_START) { float rad = currentNoseModule.currentDiameter * 0.5f; float bottom = currentMainTankModule.currentHeight * 0.5f; float top = bottom + currentNoseModule.currentHeight; shield.addShieldArea("MCB-Nose", rad, rad, top, bottom, false, false); } else { shield.removeShieldArea("MCB-Nose"); } if (currentMainTankModule.hasAnimation() && bodyAnimControl.animationState == AnimState.STOPPED_START) { float rad = currentMainTankModule.currentDiameter * 0.5f; float bottom = -currentMainTankModule.currentHeight * 0.5f; float top = -bottom; shield.addShieldArea("MCB-Body", rad, rad, top, bottom, false, false); } else { shield.removeShieldArea("MCB-Body"); } if (currentMountModule.hasAnimation() && tailAnimControl.animationState == AnimState.STOPPED_START) { float rad = currentMainTankModule.currentDiameter * 0.5f; float top = -currentMainTankModule.currentHeight * 0.5f; float bottom = top - currentMountModule.currentHeight; shield.addShieldArea("MCB-Tail", rad, rad, top, bottom, false, false); } else { shield.removeShieldArea("MCB-Tail"); } }