From 82f0d6a542ea1f987fb34eb0d0433b74d8466c33 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 20 Jul 2021 10:28:58 -0400 Subject: [PATCH] Fixed core capture crash --- core/src/mindustry/world/blocks/storage/CoreBlock.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/world/blocks/storage/CoreBlock.java b/core/src/mindustry/world/blocks/storage/CoreBlock.java index 4106277667..7cc16ad306 100644 --- a/core/src/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/mindustry/world/blocks/storage/CoreBlock.java @@ -282,8 +282,11 @@ public class CoreBlock extends StorageBlock{ public void afterDestroyed(){ if(state.rules.coreCapture){ tile.setNet(block, lastDamage, 0); - //core is invincible for several seconds to prevent recapture - ((CoreBuild)tile.build).iframes = captureInvicibility; + //building does not exist on client yet + if(!net.client()){ + //core is invincible for several seconds to prevent recapture + ((CoreBuild)tile.build).iframes = captureInvicibility; + } } }