Fix air count calculation error

This commit is contained in:
Jesse Boyd 2016-12-31 17:22:20 +11:00
parent 96cdf1230e
commit 270b7986ac
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
1 changed files with 18 additions and 4 deletions

View File

@ -192,8 +192,15 @@ public abstract class CharFaweChunk<T, V extends FaweQueue> extends FaweChunk<T>
if (vs == null) { if (vs == null) {
vs = this.ids[i] = new char[4096]; vs = this.ids[i] = new char[4096];
this.count[i]++; this.count[i]++;
} else if (vs[j] == 0) { } else {
this.count[i]++; switch (vs[j]) {
case 0:
this.count[i]++;
break;
case 1:
this.air[i]--;
break;
}
} }
switch (id) { switch (id) {
case 0: case 0:
@ -231,8 +238,15 @@ public abstract class CharFaweChunk<T, V extends FaweQueue> extends FaweChunk<T>
if (vs == null) { if (vs == null) {
vs = this.ids[i] = new char[4096]; vs = this.ids[i] = new char[4096];
this.count[i]++; this.count[i]++;
} else if (vs[j] == 0) { } else {
this.count[i]++; switch (vs[j]) {
case 0:
this.count[i]++;
break;
case 1:
this.air[i]--;
break;
}
} }
switch (id) { switch (id) {
case 0: case 0: