Skip to content

Commit

Permalink
Fix shield projector shrink effect
Browse files Browse the repository at this point in the history
  • Loading branch information
MEEPofFaith committed Mar 15, 2024
1 parent b266476 commit 8481123
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/progressed/content/effects/Pseudo3DFx.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class Pseudo3DFx{
float radius = e.rotation * e.fout();
if(radius > 0.001f){
Draw.color(e.color);
float[] corners = ShieldProjector.getShieldCorners(e.x, e.y, e.rotation, data.sides, data.rotation);
float[] corners = ShieldProjector.getShieldCorners(e.x, e.y, radius, data.sides, data.rotation);

if(renderer.animateShields){
Draw.z(Layer.shields + 0.001f);
Expand All @@ -120,7 +120,7 @@ public class Pseudo3DFx{
Draw.alpha(0.09f + Mathf.clamp(0.08f));
}
Fill.polyBegin();
ShieldProjector.drawCorners(corners, data.height, data.sides, (x1, y1, x2, y2, x3, y3, x4, y4) -> {
ShieldProjector.drawCorners(corners, data.height * e.fout(), data.sides, (x1, y1, x2, y2, x3, y3, x4, y4) -> {
Fill.quad(x1, y1, x2, y2, x3, y3, x4, y4);
Fill.polyPoint(x4, y4);
});
Expand All @@ -132,8 +132,7 @@ public class Pseudo3DFx{
Draw.z(Layer.shields + 0.001f);
}
Draw.alpha(1f);
ShieldProjector.drawCorners(corners, data.height, data.sides, (x1, y1, x2, y2, x3, y3, x4, y4) -> {
//Lines.quad(x1, y1, x2, y2, x3, y3, x4, y4); //Corners expand out wildly for some reason.
ShieldProjector.drawCorners(corners, data.height * e.fout(), data.sides, (x1, y1, x2, y2, x3, y3, x4, y4) -> {
Lines.line(x1, y1, x2, y2);
Lines.line(x1, y1, x4, y4);
Lines.line(x2, y2, x3, y3);
Expand Down

0 comments on commit 8481123

Please sign in to comment.