Cliff-spam cache fix
This commit is contained in:
@@ -41,7 +41,7 @@ public enum CacheLayer{
|
||||
}
|
||||
},
|
||||
normal(5),
|
||||
walls;
|
||||
walls(3);
|
||||
|
||||
public static final CacheLayer[] all = values();
|
||||
/** Capacity multiplier. */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user