mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
A few more edits
This commit is contained in:
parent
14bc694588
commit
b2da56b1ca
@ -283,7 +283,7 @@ namespace ConformalDecals {
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDestroy() {
|
||||
public void OnDestroy() {
|
||||
// remove GameEvents
|
||||
if (HighLogic.LoadedSceneIsEditor) {
|
||||
GameEvents.onEditorPartEvent.Remove(OnEditorEvent);
|
||||
@ -440,7 +440,8 @@ namespace ConformalDecals {
|
||||
|
||||
// update projection
|
||||
foreach (var target in _targets) {
|
||||
target.Project(_orthoMatrix, decalProjectorTransform, _boundsRenderer.bounds, useBaseNormal);
|
||||
if (target != null)
|
||||
target.Project(_orthoMatrix, decalProjectorTransform, _boundsRenderer.bounds, useBaseNormal);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -53,9 +53,7 @@ namespace ConformalDecals {
|
||||
// Unregister flag change event
|
||||
GameEvents.onMissionFlagSelect.Remove(OnEditorFlagSelected);
|
||||
}
|
||||
|
||||
//base.OnDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
[KSPEvent(guiActive = false, guiActiveEditor = true, guiName = "#LOC_ConformalDecals_gui-select-flag")]
|
||||
public void SelectFlag() {
|
||||
|
@ -227,8 +227,6 @@ namespace ConformalDecals {
|
||||
if (_textEntryController != null) _textEntryController.Close();
|
||||
if (_fillColorPickerController != null) _fillColorPickerController.Close();
|
||||
if (_outlineColorPickerController != null) _outlineColorPickerController.Close();
|
||||
|
||||
//base.OnDestroy();
|
||||
}
|
||||
|
||||
protected override void OnDetach() {
|
||||
|
Loading…
Reference in New Issue
Block a user