mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Fix mirror being offset (#4248)
Because apparently it isn't a valid map even though its been a known issue for months.
This commit is contained in:
parent
3497212b95
commit
dbe2f7eefa
@ -68,8 +68,8 @@ public class MirrorFilter extends GenerateFilter{
|
||||
void mirror(Vec2 p, float x0, float y0, float x1, float y1){
|
||||
//special case: uneven map mirrored at 45 degree angle
|
||||
if(in.width != in.height && angle % 90 != 0){
|
||||
p.x = (p.x - in.width/2f) * -1 + in.width/2f;
|
||||
p.y = (p.y - in.height/2f) * -1 + in.height/2f;
|
||||
p.x = in.width - p.x - 1;
|
||||
p.y = in.height - p.y - 1;
|
||||
}else{
|
||||
float dx = x1 - x0;
|
||||
float dy = y1 - y0;
|
||||
|
Loading…
Reference in New Issue
Block a user