Merge branch 'master' of https://github.com/Anuken/Mindustry
This commit is contained in:
@@ -21,7 +21,11 @@ public class GroundAI extends AIController{
|
||||
|
||||
if(core != null && unit.within(core, unit.range() / 1.1f + core.block.size * tilesize / 2f)){
|
||||
target = core;
|
||||
Arrays.fill(targets, core);
|
||||
for(int i = 0; i < targets.length; i++){
|
||||
if(unit.mounts[i].weapon.bullet.collidesGround){
|
||||
targets[i] = core;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){
|
||||
|
||||
@@ -368,7 +368,7 @@ public class Logic implements ApplicationListener{
|
||||
|
||||
if(state.isGame()){
|
||||
if(!net.client()){
|
||||
state.enemies = Groups.unit.count(u -> u.team() == state.rules.waveTeam && u.type.isCounted);
|
||||
state.enemies = Groups.unit.count(u -> u.team() == state.rules.waveTeam && u.isCounted());
|
||||
}
|
||||
|
||||
if(!state.isPaused()){
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ContinuousLaserBulletType extends BulletType{
|
||||
|
||||
@Override
|
||||
public float range(){
|
||||
return length;
|
||||
return Math.max(length, maxRange);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,7 +56,7 @@ public class LaserBulletType extends BulletType{
|
||||
|
||||
@Override
|
||||
public float range(){
|
||||
return length;
|
||||
return Math.max(length, maxRange);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,7 +50,7 @@ public class SapBulletType extends BulletType{
|
||||
|
||||
@Override
|
||||
public float range(){
|
||||
return length;
|
||||
return Math.max(length, maxRange);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ShrapnelBulletType extends BulletType{
|
||||
|
||||
@Override
|
||||
public float range(){
|
||||
return length;
|
||||
return Math.max(length, maxRange);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -186,6 +186,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
return !disarmed && !(type.canBoost && isFlying());
|
||||
}
|
||||
|
||||
public boolean isCounted(){
|
||||
return type.isCounted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int itemCapacity(){
|
||||
return type.itemCapacity;
|
||||
|
||||
Reference in New Issue
Block a user