diff --git a/src/js/game/systems/belt.js b/src/js/game/systems/belt.js index 10f57b4b..5e4ac7f0 100644 --- a/src/js/game/systems/belt.js +++ b/src/js/game/systems/belt.js @@ -256,7 +256,7 @@ export class BeltSystem extends GameSystemWithFilter { maxProgress = Math.min(2, 1 - globalConfig.itemSpacingOnBelts + spacingOnBelt); // Useful check, but hurts performance - // assert(maxProgress >= 0.0, "max progress < 0 (I)"); + // assert(maxProgress >= 0.0, "max progress < 0 (I) (" + maxProgress + ")"); } } @@ -280,12 +280,16 @@ export class BeltSystem extends GameSystemWithFilter { const progressAndItem = items[itemIndex]; progressAndItem[0] = Math.min(maxProgress, progressAndItem[0] + speedMultiplier * beltSpeed); + assert(progressAndItem[0] >= 0, "Bad progress: " + progressAndItem[0]); if (progressAndItem[0] >= 1.0) { if (beltComp.followUpCache) { const followUpBelt = beltComp.followUpCache.components.Belt; if (followUpBelt.canAcceptItem()) { - followUpBelt.takeItem(progressAndItem[1], progressAndItem[0] - takeoverOffset); + followUpBelt.takeItem( + progressAndItem[1], + Math_max(0, progressAndItem[0] - takeoverOffset) + ); items.splice(itemIndex, 1); } else { // Well, we couldn't really take it to a follow up belt, keep it at diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 74734949..be81c695 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -215,7 +215,7 @@ export const allApplicationSettings = [ }), new EnumSetting("refreshRate", { - options: ["60", "100", "144", "165", "250", "500"], + options: ["60", "100", "144", "165", "250", G_IS_DEV ? "10" : "500"], valueGetter: rate => rate, textGetter: rate => rate + " Hz", category: categoryGame,