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

View File

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