mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-11 07:39:39 +07:00
Merge branch 'master' of https://github.com/Anuken/Mindustry
This commit is contained in:
commit
c5a550bf78
@ -262,15 +262,15 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
}
|
||||
|
||||
public void flipRequests(Array<BuildRequest> requests, boolean x){
|
||||
int origin = x ? rawTileX() : rawTileY();
|
||||
int origin = (x ? rawTileX() : rawTileY()) * tilesize;
|
||||
|
||||
requests.each(req -> {
|
||||
int value = -((x ? req.x : req.y) - origin) + origin;
|
||||
float value = -((x ? req.x : req.y) * tilesize - origin + req.block.offset()) + origin;
|
||||
|
||||
if(x){
|
||||
req.x = value;
|
||||
req.x = (int)((value - req.block.offset()) / tilesize);
|
||||
}else{
|
||||
req.y = value;
|
||||
req.y = (int)((value - req.block.offset()) / tilesize);
|
||||
}
|
||||
|
||||
if(req.block.posConfig){
|
||||
|
Loading…
Reference in New Issue
Block a user