Fixed meltdown not firing when cheating
This commit is contained in:
@@ -60,7 +60,7 @@ public class LaserTurret extends PowerTurret{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(entity.reload >= reload && entity.cons.valid()){
|
if(entity.reload >= reload && (entity.cons.valid() || tile.isEnemyCheat())){
|
||||||
BulletType type = peekAmmo(tile);
|
BulletType type = peekAmmo(tile);
|
||||||
|
|
||||||
shoot(tile, type);
|
shoot(tile, type);
|
||||||
@@ -70,7 +70,7 @@ public class LaserTurret extends PowerTurret{
|
|||||||
Liquid liquid = entity.liquids.current();
|
Liquid liquid = entity.liquids.current();
|
||||||
float maxUsed = consumes.<ConsumeLiquidBase>get(ConsumeType.liquid).amount;
|
float maxUsed = consumes.<ConsumeLiquidBase>get(ConsumeType.liquid).amount;
|
||||||
|
|
||||||
float used = Math.min(entity.liquids.get(liquid), maxUsed * Time.delta());
|
float used = tile.isEnemyCheat() ? maxUsed : Math.min(entity.liquids.get(liquid), maxUsed * Time.delta());
|
||||||
entity.reload += used;
|
entity.reload += used;
|
||||||
entity.liquids.remove(liquid, used);
|
entity.liquids.remove(liquid, used);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user