Do not save MirrorFilter temporary vectors
This commit is contained in:
@@ -59,12 +59,12 @@ public class ParticleEffect extends Effect{
|
|||||||
|
|
||||||
Angles.randLenVectors(e.id, particles, length * fin + baseLength, e.rotation, cone, (x, y) -> {
|
Angles.randLenVectors(e.id, particles, length * fin + baseLength, e.rotation, cone, (x, y) -> {
|
||||||
Lines.lineAngle(ox + x, oy + y, Mathf.angle(x, y), len);
|
Lines.lineAngle(ox + x, oy + y, Mathf.angle(x, y), len);
|
||||||
Drawf.light(ox + x, oy + y, len * lightScl, lightColor, lightOpacity);
|
Drawf.light(ox + x, oy + y, len * lightScl, lightColor, lightOpacity* Draw.getColor().a);
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
Angles.randLenVectors(e.id, particles, length * fin + baseLength, e.rotation, cone, (x, y) -> {
|
Angles.randLenVectors(e.id, particles, length * fin + baseLength, e.rotation, cone, (x, y) -> {
|
||||||
Draw.rect(tex, ox + x, oy + y, rad, rad, e.rotation + offset + e.time * spin);
|
Draw.rect(tex, ox + x, oy + y, rad, rad, e.rotation + offset + e.time * spin);
|
||||||
Drawf.light(ox + x, oy + y, rad * lightScl, lightColor, lightOpacity);
|
Drawf.light(ox + x, oy + y, rad * lightScl, lightColor, lightOpacity * Draw.getColor().a);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import mindustry.maps.filters.FilterOption.*;
|
|||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
public class MirrorFilter extends GenerateFilter{
|
public class MirrorFilter extends GenerateFilter{
|
||||||
private final Vec2 v1 = new Vec2(), v2 = new Vec2(), v3 = new Vec2();
|
private static final Vec2 v1 = new Vec2(), v2 = new Vec2(), v3 = new Vec2();
|
||||||
|
|
||||||
int angle = 45;
|
int angle = 45;
|
||||||
boolean rotate = false;
|
boolean rotate = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user