Make missile units not be affected by map border. (#7530)

* Unbounded units

* Unbound missiles
This commit is contained in:
MEEPofFaith
2022-09-08 09:58:29 -07:00
committed by GitHub
parent b7e8c211f7
commit 2f5f984416
3 changed files with 7 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import arc.util.*;
import mindustry.annotations.Annotations.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.type.*;
import static mindustry.Vars.*;
@@ -12,11 +13,14 @@ import static mindustry.Vars.*;
abstract class BoundedComp implements Velc, Posc, Healthc, Flyingc{
static final float warpDst = 30f;
@Import UnitType type;
@Import float x, y;
@Import Team team;
@Override
public void update(){
if(!type.bounded) return;
float bot = 0f, left = 0f, top = world.unitHeight(), right = world.unitWidth();
//TODO hidden map rules only apply to player teams? should they?