Misc minor fixes

This commit is contained in:
Anuken
2022-07-04 16:52:18 -04:00
parent 02dd74b113
commit 5b1d1a2ce4
4 changed files with 7 additions and 7 deletions

View File

@@ -24,7 +24,7 @@ public class MissileAI extends AIController{
var build = unit.buildOn(); var build = unit.buildOn();
//kill instantly on enemy building contact //kill instantly on enemy building contact
if(build != null && build.team != unit.team){ if(build != null && build.team != unit.team && (build == target || !build.block.underBullets)){
unit.kill(); unit.kill();
} }
} }

View File

@@ -30,7 +30,7 @@ public class RegionPart extends DrawPart{
/** Progress function for heat alpha. */ /** Progress function for heat alpha. */
public PartProgress heatProgress = PartProgress.heat; public PartProgress heatProgress = PartProgress.heat;
public Blending blending = Blending.normal; public Blending blending = Blending.normal;
public float layer = -1, layerOffset = 0f, heatLayerOffset = 1f; public float layer = -1, layerOffset = 0f, heatLayerOffset = 1f, turretHeatLayer = Layer.turretHeat;
public float outlineLayerOffset = -0.001f; public float outlineLayerOffset = -0.001f;
public float x, y, rotation; public float x, y, rotation;
public float moveX, moveY, moveRot; public float moveX, moveY, moveRot;
@@ -119,7 +119,7 @@ public class RegionPart extends DrawPart{
} }
if(heat.found()){ if(heat.found()){
Drawf.additive(heat, heatColor.write(Tmp.c1).a(heatProgress.getClamp(params) * heatColor.a), rx, ry, rot, turretShading ? Layer.turretHeat : Draw.z() + heatLayerOffset); Drawf.additive(heat, heatColor.write(Tmp.c1).a(heatProgress.getClamp(params) * heatColor.a), rx, ry, rot, turretShading ? turretHeatLayer : Draw.z() + heatLayerOffset);
} }
Draw.xscl *= sign; Draw.xscl *= sign;

View File

@@ -134,16 +134,16 @@ public class DirectionBridge extends Block{
cy = (y1 + y2)/2f, cy = (y1 + y2)/2f,
len = Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)) - size * tilesize; len = Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)) - size * tilesize;
Draw.rect(bridgeRegion, cx, cy, len, tilesize, angle); Draw.rect(bridgeRegion, cx, cy, len, bridgeRegion.height * Draw.scl, angle);
if(liquidColor != null){ if(liquidColor != null){
Draw.color(liquidColor, liquidColor.a * Renderer.bridgeOpacity); Draw.color(liquidColor, liquidColor.a * Renderer.bridgeOpacity);
Draw.rect(bridgeLiquidRegion, cx, cy, len, tilesize, angle); Draw.rect(bridgeLiquidRegion, cx, cy, len, bridgeLiquidRegion.height * Draw.scl, angle);
Draw.color(); Draw.color();
Draw.alpha(Renderer.bridgeOpacity); Draw.alpha(Renderer.bridgeOpacity);
} }
if(bridgeBotRegion.found()){ if(bridgeBotRegion.found()){
Draw.color(0.4f, 0.4f, 0.4f, 0.4f * Renderer.bridgeOpacity); Draw.color(0.4f, 0.4f, 0.4f, 0.4f * Renderer.bridgeOpacity);
Draw.rect(bridgeBotRegion, cx, cy, len, tilesize, angle); Draw.rect(bridgeBotRegion, cx, cy, len, bridgeBotRegion.height * Draw.scl, angle);
Draw.reset(); Draw.reset();
} }
Draw.alpha(Renderer.bridgeOpacity); Draw.alpha(Renderer.bridgeOpacity);

View File

@@ -50,7 +50,7 @@ public class DrawTurret extends DrawBlock{
Draw.rect(base, build.x, build.y); Draw.rect(base, build.x, build.y);
Draw.color(); Draw.color();
Draw.z(Layer.turret - 0.02f); Draw.z(Layer.turret - 0.5f);
Drawf.shadow(preview, build.x + tb.recoilOffset.x - turret.elevation, build.y + tb.recoilOffset.y - turret.elevation, tb.drawrot()); Drawf.shadow(preview, build.x + tb.recoilOffset.x - turret.elevation, build.y + tb.recoilOffset.y - turret.elevation, tb.drawrot());