Weapon animation suffering

This commit is contained in:
Anuken
2022-02-03 00:59:21 -05:00
parent 1388d0a4ca
commit 2f989d57bb
10 changed files with 68 additions and 30 deletions

View File

@@ -20,8 +20,6 @@ public class RegionPart extends WeaponPart{
public boolean mirror = false;
/** If true, an outline is drawn under the part. */
public boolean outline = true;
/** If true, the layer is overridden to be under the weapon/turret itself. */
public boolean under = false;
/** If true, the base + outline regions are drawn. Set to false for heat-only regions. */
public boolean drawRegion = true;
/** If true, progress is inverted. */
@@ -49,7 +47,8 @@ public class RegionPart extends WeaponPart{
public void draw(PartParams params){
float z = Draw.z();
if(layer > 0) Draw.z(layer);
if(under) Draw.z(z - 0.0001f);
//TODO 'under' should not be special cased like this...
if(under && turretShading) Draw.z(z - 0.0001f);
float prevZ = Draw.z();
float progress = useReload ? 1f - params.reload : params.warmup;

View File

@@ -8,6 +8,8 @@ public abstract class WeaponPart{
/** If true, turret shading is used. Don't touch this, it is set up in unit/block init()! */
public boolean turretShading;
/** If true, the layer is overridden to be under the weapon/turret itself. */
public boolean under = false;
public abstract void draw(PartParams params);
public abstract void load(String name);