fix
This commit is contained in:
parent
5d188da416
commit
2c50e31fbe
|
@ -236,12 +236,11 @@
|
||||||
var completed = true;
|
var completed = true;
|
||||||
|
|
||||||
for (var i = 0; i < bitfieldCompletedArr.length; i++) {
|
for (var i = 0; i < bitfieldCompletedArr.length; i++) {
|
||||||
if (bitfieldCompletedArr[i] > 0xf) {
|
var bitCount = Math.min(bitfieldCompletedArr[i], 0xf);
|
||||||
healthBitCount += 0xf;
|
healthBitCount += bitCount;
|
||||||
bitfieldCompletedArr[i] -= 0xf;
|
bitfieldCompletedArr[i] -= bitCount;
|
||||||
} else {
|
|
||||||
healthBitCount += bitfieldCompletedArr[i];
|
if (bitCount < 0xf) {
|
||||||
bitfieldCompletedArr[i] = 0;
|
|
||||||
completed = false;
|
completed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue