Duct bridge crash fix
This commit is contained in:
@@ -211,7 +211,7 @@ public class DuctBridge extends Block{
|
|||||||
public DuctBridgeBuild findLink(){
|
public DuctBridgeBuild findLink(){
|
||||||
for(int i = 1; i <= range; i++){
|
for(int i = 1; i <= range; i++){
|
||||||
Tile other = tile.nearby(Geometry.d4x(rotation) * i, Geometry.d4y(rotation) * i);
|
Tile other = tile.nearby(Geometry.d4x(rotation) * i, Geometry.d4y(rotation) * i);
|
||||||
if(other.build instanceof DuctBridgeBuild build && build.team == team){
|
if(other != null && other.build instanceof DuctBridgeBuild build && build.team == team){
|
||||||
return build;
|
return build;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user