delta in reload for a LaserTurret isn't properly calculated (#6068)

This commit is contained in:
Matthew Peng 2021-09-28 05:41:40 -07:00 committed by GitHub
parent 366822e4d1
commit 182dfc5f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,7 @@ public class LaserTurret extends PowerTurret{
Liquid liquid = liquids.current();
float maxUsed = consumes.<ConsumeLiquidBase>get(ConsumeType.liquid).amount;
float used = (cheating() ? maxUsed * Time.delta : Math.min(liquids.get(liquid), maxUsed * Time.delta));
float used = (cheating() ? maxUsed : Math.min(liquids.get(liquid), maxUsed)) * Time.delta;
reload -= used * liquid.heatCapacity * coolantMultiplier;
liquids.remove(liquid, used);