Capped explosive damage of blocks

This commit is contained in:
Anuken
2023-08-23 11:05:09 -04:00
parent beeeee9169
commit c829f32efa

View File

@@ -1373,7 +1373,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
});
}
Damage.dynamicExplosion(x, y, flammability, explosiveness * 3.5f, power, tilesize * block.size / 2f, state.rules.damageExplosions, block.destroyEffect);
//cap explosiveness so fluid tanks/vaults don't instakill units
Damage.dynamicExplosion(x, y, flammability, Math.min(explosiveness * 3.5f, 1000), power, tilesize * block.size / 2f, state.rules.damageExplosions, block.destroyEffect);
if(block.createRubble && !floor().solid && !floor().isLiquid){
Effect.rubble(x, y, block.size);