Decrement instead of increment queue value

This is a bit more intuitive since newer decals render over older ones
This commit is contained in:
Andrew Cassidy 2020-06-01 21:14:41 -07:00
parent 6ae598d9f5
commit dfd4224ae0
2 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ namespace ConformalDecals {
[KSPField] public MaterialPropertyCollection materialProperties; [KSPField] public MaterialPropertyCollection materialProperties;
[KSPField] public Material decalMaterial; [KSPField] public Material decalMaterial;
private static int _decalQueueCounter = -1; private static int _decalQueueCounter = 0;
private List<ProjectionTarget> _targets; private List<ProjectionTarget> _targets;
@ -63,9 +63,9 @@ namespace ConformalDecals {
private int DecalQueue { private int DecalQueue {
get { get {
_decalQueueCounter++; _decalQueueCounter--;
if (_decalQueueCounter > decalQueueRange.y || _decalQueueCounter < decalQueueRange.x) { if (_decalQueueCounter < decalQueueRange.x) {
_decalQueueCounter = (int) decalQueueRange.x; _decalQueueCounter = (int) decalQueueRange.y;
} }
this.Log($"returning decal queue value {_decalQueueCounter}"); this.Log($"returning decal queue value {_decalQueueCounter}");