mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-12-22 21:24:11 +07:00
Fixed rare schematic crash
This commit is contained in:
parent
4a9eeeeac3
commit
ae8833e679
@ -351,7 +351,7 @@ public class Schematics implements Loadable{
|
||||
Building linked = world.build(cx, cy);
|
||||
Block realBlock = linked == null ? null : linked instanceof ConstructBuild cons ? cons.cblock : linked.block;
|
||||
|
||||
if(linked != null && (realBlock.isVisible() || realBlock instanceof CoreBlock)){
|
||||
if(linked != null && realBlock != null && (realBlock.isVisible() || realBlock instanceof CoreBlock)){
|
||||
int top = realBlock.size/2;
|
||||
int bot = realBlock.size % 2 == 1 ? -realBlock.size/2 : -(realBlock.size - 1)/2;
|
||||
minx = Math.min(linked.tileX() + bot, minx);
|
||||
@ -380,7 +380,7 @@ public class Schematics implements Loadable{
|
||||
Building tile = world.build(cx, cy);
|
||||
Block realBlock = tile == null ? null : tile instanceof ConstructBuild cons ? cons.cblock : tile.block;
|
||||
|
||||
if(tile != null && !counted.contains(tile.pos())
|
||||
if(tile != null && !counted.contains(tile.pos()) && realBlock != null
|
||||
&& (realBlock.isVisible() || realBlock instanceof CoreBlock)){
|
||||
Object config = tile instanceof ConstructBuild cons ? cons.lastConfig : tile.config();
|
||||
|
||||
|
8
fastlane/metadata/android/en-US/changelogs/29841.txt
Normal file
8
fastlane/metadata/android/en-US/changelogs/29841.txt
Normal file
@ -0,0 +1,8 @@
|
||||
[This is a truncated changelog, see Github for full notes]
|
||||
- Fixed bridges being planned without unlock in campaign
|
||||
- Fixed player moving slower on servers with status effects
|
||||
- Fixed player not respecting formation speed on servers
|
||||
- Fixed separators consuming power when idle
|
||||
- Fixed logic blocks not saving buildings on reload
|
||||
- Fixed rare door placement crash
|
||||
- Fixed logic units being able to take/remove items from any team block
|
Loading…
Reference in New Issue
Block a user