1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Update item_processor.js

This commit is contained in:
Sense101 2021-01-02 21:54:16 +00:00 committed by GitHub
parent da9996202c
commit 97ffda0ed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,8 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
if (currentCharge) {
// Process next charge
if (currentCharge.remainingTime > 0.0) {
currentCharge.remainingTime -= this.root.dynamicTickrate.deltaSeconds;
const deltaTime = this.root.dynamicTickrate.deltaSeconds + processorComp.bonusTime;
currentCharge.remainingTime -= deltaTime;
if (currentCharge.remainingTime < 0.0) {
// Add bonus time, this is the time we spent too much
processorComp.bonusTime += -currentCharge.remainingTime;