Cliff-spam cache fix

This commit is contained in:
Anuken
2020-09-15 23:49:40 -04:00
parent 52ff09d024
commit 462e6733ed
2 changed files with 4 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ public enum CacheLayer{
}
},
normal(5),
walls;
walls(3);
public static final CacheLayer[] all = values();
/** Capacity multiplier. */

View File

@@ -6,6 +6,7 @@ import mindustry.graphics.*;
import mindustry.world.*;
public class Cliff extends Block{
public float size = 11f;
public Cliff(String name){
super(name);
@@ -18,11 +19,12 @@ public class Cliff extends Block{
@Override
public void drawBase(Tile tile){
int r = tile.data;
for(int i = 0; i < 8; i++){
if((r & (1 << i)) != 0){
Draw.color(Tmp.c1.set(tile.floor().mapColor).mul(1.3f + (i >= 4 ? -0.4f : 0.3f)));
Draw.rect(region, tile.worldx(), tile.worldy(), 11f, 11f, i * 45f);
Draw.rect(region, tile.worldx(), tile.worldy(), size, size, i * 45f);
}
}