This commit is contained in:
@@ -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)){
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user