Fixed #3402 / Fixed #3403 / Fixed #3401 / Fixed #3404 / Disabled derelict updates

This commit is contained in:
Anuken
2020-11-15 10:54:09 -05:00
parent 49e4aaa49b
commit aebd3f959f
13 changed files with 50 additions and 27 deletions

View File

@@ -197,7 +197,7 @@ public class Units{
cdist = 0f;
nearbyEnemies(team, x - range, y - range, range*2f, range*2f, e -> {
if(e.dead() || !predicate.get(e)) return;
if(e.dead() || !predicate.get(e) || e.team == Team.derelict) return;
float dst2 = e.dst2(x, y);
if(dst2 < range*range && (result == null || dst2 < cdist)){

View File

@@ -1371,6 +1371,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
}
}
if(team == Team.derelict){
enabled = false;
}
if(!headless){
if(sound != null){
sound.update(x, y, shouldActiveSound());

View File

@@ -109,6 +109,8 @@ public class AIController implements UnitController{
target = null;
}
unit.isShooting = false;
for(int i = 0; i < targets.length; i++){
WeaponMount mount = unit.mounts[i];
Weapon weapon = mount.weapon;
@@ -140,6 +142,8 @@ public class AIController implements UnitController{
mount.shoot = shoot;
mount.rotate = shoot;
unit.isShooting |= shoot;
}
}