align opacity check with ItemBridge (#2036)

* align opacity check with ItemBridge

* align opacity check with ItemBridge
This commit is contained in:
zethnest 2020-05-12 21:38:27 +08:00 committed by GitHub
parent f6d8658ee2
commit 3c4c046e1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,10 +132,8 @@ public class PowerNode extends PowerBlock{
} }
protected void drawLaser(float x1, float y1, float x2, float y2, float satisfaction, int size1, int size2){ protected void drawLaser(float x1, float y1, float x2, float y2, float satisfaction, int size1, int size2){
int opacityPercentage = Core.settings.getInt("lasersopacity"); float opacity = Core.settings.getInt("lasersopacity") / 100f;
if(opacityPercentage == 0) return; if(Mathf.zero(opacity)) return;
float opacity = opacityPercentage / 100f;
float angle1 = Angles.angle(x1, y1, x2, y2); float angle1 = Angles.angle(x1, y1, x2, y2);
t1.trns(angle1, size1 * tilesize / 2f - 1.5f); t1.trns(angle1, size1 * tilesize / 2f - 1.5f);