Skip to content

Commit

Permalink
Consistent engine whites (#10482)
Browse files Browse the repository at this point in the history
  • Loading branch information
MEEPofFaith authored Feb 9, 2025
1 parent 4183a2a commit 848249a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions core/src/mindustry/type/UnitType.java
Original file line number Diff line number Diff line change
Expand Up @@ -1754,29 +1754,30 @@ public void draw(Unit unit){

Tmp.v1.set(x, y).rotate(rot);
float ex = Tmp.v1.x, ey = Tmp.v1.y;
float rad = (radius + Mathf.absin(Time.time, 2f, radius / 4f)) * scale;

//engine outlines (cursed?)
/*float z = Draw.z();
Draw.z(z - 0.0001f);
Draw.color(type.outlineColor);
Fill.circle(
unit.x + ex,
unit.y + ey,
(type.outlineRadius * Draw.scl + radius + Mathf.absin(Time.time, 2f, radius / 4f)) * scale
unit.x + ex,
unit.y + ey,
(type.outlineRadius * Draw.scl + radius + Mathf.absin(Time.time, 2f, radius / 4f)) * scale
);
Draw.z(z);*/

Draw.color(color);
Fill.circle(
unit.x + ex,
unit.y + ey,
(radius + Mathf.absin(Time.time, 2f, radius / 4f)) * scale
unit.x + ex,
unit.y + ey,
rad
);
Draw.color(type.engineColorInner);
Fill.circle(
unit.x + ex - Angles.trnsx(rot + rotation, 1f),
unit.y + ey - Angles.trnsy(rot + rotation, 1f),
(radius + Mathf.absin(Time.time, 2f, radius / 4f)) / 2f * scale
unit.x + ex - Angles.trnsx(rot + rotation, rad / 4f),
unit.y + ey - Angles.trnsy(rot + rotation, rad / 4f),
rad / 2f
);
}

Expand Down

0 comments on commit 848249a

Please sign in to comment.