mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Fixed unit duplication
This commit is contained in:
parent
bdb7f522fb
commit
80c26606f0
@ -23,6 +23,7 @@ import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.units.UnitFactory.UnitFactoryEntity;
|
||||
import io.anuke.mindustry.world.meta.BlockFlag;
|
||||
|
||||
import java.io.*;
|
||||
@ -264,7 +265,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
|
||||
avoidOthers();
|
||||
|
||||
if(spawner != noSpawner && (world.tile(spawner) == null || world.tile(spawner).entity == null)){
|
||||
if(spawner != noSpawner && (world.tile(spawner) == null || !(world.tile(spawner).entity instanceof UnitFactoryEntity))){
|
||||
kill();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user