From 677bad5c601cfcde0a4767b455615493bdb9a8bf Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 4 Jun 2021 08:30:16 -0400 Subject: [PATCH] Fixed #5348 --- .../blocks/defense/shock-mine-team-top.png | Bin 152 -> 158 bytes core/src/mindustry/entities/comp/FireComp.java | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/assets-raw/sprites/blocks/defense/shock-mine-team-top.png b/core/assets-raw/sprites/blocks/defense/shock-mine-team-top.png index 58597159bf4ec14176cd2b1c0f55111a3ac7f995..e215e1a1ea09af8af4dde7d14184ec502a12ba7f 100644 GIT binary patch delta 116 zcmV-)0E_>a0iFSnF>P2$L_t(oh3(YK4ge4gL{ats|IEh5LYUSgl6%(FP^1I^_*rQp zH7v4tSIEp&%Qb1VYflJy!tBV^5Yph)ek&oe65xctS}+T7eDeIRF3v diff --git a/core/src/mindustry/entities/comp/FireComp.java b/core/src/mindustry/entities/comp/FireComp.java index ea520c0075..3a767fb898 100644 --- a/core/src/mindustry/entities/comp/FireComp.java +++ b/core/src/mindustry/entities/comp/FireComp.java @@ -35,7 +35,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{ baseFlammability = -1, puddleFlammability, damageTimer = Mathf.random(40f), spreadTimer = Mathf.random(spreadDelay), fireballTimer = Mathf.random(fireballDelay), warmup = 0f, - animation = Mathf.random(frames); + animation = Mathf.random(frames - 1); @Override public void update(){ @@ -116,7 +116,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{ Draw.alpha(Mathf.clamp(warmup / warmupDuration)); Draw.z(Layer.effect); - Draw.rect(regions[(int)animation], x, y); + Draw.rect(regions[Math.min((int)animation, regions.length - 1)], x, y); Draw.reset(); Drawf.light(x, y, 50f + Mathf.absin(5f, 5f), Pal.lightFlame, 0.6f * Mathf.clamp(warmup / warmupDuration));