drawCracks and createRubble (#6989)
This commit is contained in:
@@ -1108,7 +1108,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
|
||||
public void drawCracks(){
|
||||
if(!damaged() || block.size > BlockRenderer.maxCrackSize) return;
|
||||
if(!block.drawCracks || !damaged() || block.size > BlockRenderer.maxCrackSize) return;
|
||||
int id = pos();
|
||||
TextureRegion region = renderer.blocks.cracks[block.size - 1][Mathf.clamp((int)((1f - healthf()) * BlockRenderer.crackRegions), 0, BlockRenderer.crackRegions-1)];
|
||||
Draw.colorl(0.2f, 0.1f + (1f - healthf())* 0.6f);
|
||||
@@ -1322,7 +1322,7 @@ 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);
|
||||
|
||||
if(!floor().solid && !floor().isLiquid){
|
||||
if(block.createRubble && !floor().solid && !floor().isLiquid){
|
||||
Effect.rubble(x, y, block.size);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user