This commit is contained in:
sharlotte
2021-08-08 15:23:12 +09:00
parent 06f020ceb9
commit 16a4a699ca
8 changed files with 122 additions and 81 deletions

View File

@@ -114,7 +114,7 @@ public class Main extends Mod {
if(player.dst(e) <= max || (control.input.block != null && dst <= max)) {
if(canHit || settings.getBool("allTargetRange")){
if(settings.getBool("softRangeDrawing")){
Lines.stroke(1, Tmp.c1.set(canHit ? e.team.color : Team.derelict.color).a(0.5f));
Lines.stroke(Scl.scl(), Tmp.c1.set(canHit ? e.team.color : Team.derelict.color).a(0.5f));
Lines.poly(e.x, e.y, Lines.circleVertices(range), range);
Fill.light(e.x, e.y, Lines.circleVertices(range), range, Color.clear, Tmp.c1.a(Mathf.clamp(1-((control.input.block != null && dst <= max ? dst : player.dst(e))/max), 0, settings.getInt("softRangeOpacity")/100f)));
}
@@ -136,7 +136,7 @@ public class Main extends Mod {
if(Vars.player.dst(u) <= max) { // TODO: Store value of rangeRadius as an int, should increase performance
if (canHit || settings.getBool("allTargetRange")) // Same as above
if(settings.getBool("softRangeDrawing")){
Lines.stroke(1, Tmp.c1.set(canHit ? u.team.color : Team.derelict.color).a(0.5f));
Lines.stroke(Scl.scl(), Tmp.c1.set(canHit ? u.team.color : Team.derelict.color).a(0.5f));
Lines.poly(u.x, u.y, Lines.circleVertices(range), range);
Fill.light(u.x, u.y, Lines.circleVertices(range), range, Color.clear, Tmp.c1.a(Math.min(settings.getInt("softRangeOpacity")/100f, 1-Vars.player.dst(u)/max)));
}