Skip to content

Commit

Permalink
Fix #41
Browse files Browse the repository at this point in the history
Since assets are not loaded on headless, fullIcon would be null. Just skip setting clipsize if headless.
  • Loading branch information
MEEPofFaith authored Oct 22, 2023
1 parent d4714eb commit 89baf48
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void init(){
if(buildY == Float.NEGATIVE_INFINITY) buildY = size * Vars.tilesize / 2f;
if(elevation < 0) elevation = size / 2f;

clipSize = Math.max(clipSize, Math.abs(buildY) + swordType.fullIcon.height / 4f);
if(!headless) clipSize = Math.max(clipSize, Math.abs(buildY) + swordType.fullIcon.height / 4f);
if(targetColor != null) clipSize = Math.max(clipSize, range + targetRad);
if(targetY == Float.NEGATIVE_INFINITY) targetY = size * Vars.tilesize / 2f;
}
Expand Down

0 comments on commit 89baf48

Please sign in to comment.