🚮Upgrade cleanup
This commit is contained in:
@@ -44,6 +44,11 @@ abstract class BlockUnitComp implements Unitc{
|
||||
return tile == null || tile.dead();
|
||||
}
|
||||
|
||||
@Replace
|
||||
public boolean isValid(){
|
||||
return tile != null && tile.isValid();
|
||||
}
|
||||
|
||||
@Replace
|
||||
public void team(Team team){
|
||||
if(tile != null && this.team != team){
|
||||
|
||||
@@ -80,7 +80,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
if(unit.dead() || !unit.isAdded()){
|
||||
if(!unit.isValid()){
|
||||
clearUnit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user