mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-25 14:01:03 -08:00
Merge pull request #3096 from azureblue/placement-direction
make ending direction follow the path
This commit is contained in:
commit
aaacf244d2
1 changed files with 8 additions and 1 deletions
|
|
@ -1214,7 +1214,14 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
line.x = point.x;
|
||||
line.y = point.y;
|
||||
if(!overrideLineRotation || diagonal){
|
||||
line.rotation = next != null ? Tile.relativeTo(point.x, point.y, next.x, next.y) : baseRotation;
|
||||
if(next != null){
|
||||
line.rotation = Tile.relativeTo(point.x, point.y, next.x, next.y);
|
||||
}else if(block.conveyorPlacement && i > 0){
|
||||
Point2 prev = points.get(i - 1);
|
||||
line.rotation = Tile.relativeTo(prev.x, prev.y, point.x, point.y);
|
||||
}else{
|
||||
line.rotation = baseRotation;
|
||||
}
|
||||
}else{
|
||||
line.rotation = rotation;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue