From 031b1abe0aabdb06ce9384b9d73e8e2313970984 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 13 Aug 2021 14:14:58 -0400 Subject: [PATCH] Allow animations without top regions --- core/src/mindustry/core/Control.java | 2 ++ core/src/mindustry/world/draw/DrawAnimation.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index e4f84b8d38..c8ec84674f 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -383,6 +383,8 @@ public class Control implements ApplicationListener, Loadable{ Groups.fire.clear(); Groups.puddle.clear(); + //reset to 0, so replaced cores don't count + state.rules.defaultTeam.data().unitCap = 0; Schematics.placeLaunchLoadout(spawn.x, spawn.y); //set up camera/player locations diff --git a/core/src/mindustry/world/draw/DrawAnimation.java b/core/src/mindustry/world/draw/DrawAnimation.java index f0699634a4..14b2b8d6b7 100644 --- a/core/src/mindustry/world/draw/DrawAnimation.java +++ b/core/src/mindustry/world/draw/DrawAnimation.java @@ -45,6 +45,6 @@ public class DrawAnimation extends DrawBlock{ @Override public TextureRegion[] icons(Block block){ - return new TextureRegion[]{block.region, top}; + return top.found() ? new TextureRegion[]{block.region, top} : new TextureRegion[]{block.region}; } }