From 44b73d4c132476061f0e278fa688396fd4ede918 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Wed, 5 Oct 2022 02:47:09 -0700 Subject: [PATCH] Load bullet part regions (#7663) * Load bullet part regions * Unnecessary, just use name in the part --- core/src/mindustry/entities/bullet/BasicBulletType.java | 2 ++ core/src/mindustry/entities/bullet/BulletType.java | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/core/src/mindustry/entities/bullet/BasicBulletType.java b/core/src/mindustry/entities/bullet/BasicBulletType.java index 102b8ecb1d..3ff978e6a3 100644 --- a/core/src/mindustry/entities/bullet/BasicBulletType.java +++ b/core/src/mindustry/entities/bullet/BasicBulletType.java @@ -38,6 +38,8 @@ public class BasicBulletType extends BulletType{ @Override public void load(){ + super.load(); + backRegion = Core.atlas.find(backSprite == null ? (sprite + "-back") : backSprite); frontRegion = Core.atlas.find(sprite); } diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index e285488d41..020bd40b75 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -301,6 +301,14 @@ public class BulletType extends Content implements Cloneable{ } } + @Override + public void load(){ + for(var part : parts){ + part.turretShading = false; + part.load(null); + } + } + /** @return estimated damage per shot. this can be very inaccurate. */ public float estimateDPS(){ float sum = damage + splashDamage*0.75f;