Batched building health update packet

This commit is contained in:
Anuken
2022-06-22 18:30:59 -04:00
parent 2de706cc6d
commit 1a98a66f23
11 changed files with 135 additions and 54 deletions

View File

@@ -84,14 +84,14 @@ public class RegionPart extends DrawPart{
//can be null
var region = drawRegion ? regions[Math.min(i, regions.length - 1)] : null;
float sign = (i == 0 ? 1 : -1) * params.sideMultiplier;
Tmp.v1.set((x + mx) * sign, y + my).rotateRadExact((params.rotation - 90) * Mathf.degRad);
Tmp.v1.set((x + mx) * sign * Draw.xscl, (y + my) * Draw.yscl).rotateRadExact((params.rotation - 90) * Mathf.degRad);
float
rx = params.x + Tmp.v1.x,
ry = params.y + Tmp.v1.y,
rot = mr * sign + params.rotation - 90;
Draw.xscl = sign;
Draw.xscl *= sign;
if(outline && drawRegion){
Draw.z(prevZ + outlineLayerOffset);
@@ -115,7 +115,7 @@ public class RegionPart extends DrawPart{
Drawf.additive(heat, heatColor.write(Tmp.c1).a(heatProgress.getClamp(params) * heatColor.a), rx, ry, rot, turretShading ? Layer.turretHeat : Draw.z() + heatLayerOffset);
}
Draw.xscl = 1f;
Draw.xscl *= sign;
}
Draw.z(z);