mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-12 08:48:09 +07:00
Minor optimization
This commit is contained in:
@ -15,14 +15,6 @@ public class GroundAI extends AIController{
|
|||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
|
|
||||||
//TODO test
|
|
||||||
if(true){
|
|
||||||
unit.controlWeapons(true, true);
|
|
||||||
unit.aimLook(unit.x(), unit.y() + 10);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Units.invalidateTarget(target, unit.team(), unit.x(), unit.y(), Float.MAX_VALUE)){
|
if(Units.invalidateTarget(target, unit.team(), unit.x(), unit.y(), Float.MAX_VALUE)){
|
||||||
target = null;
|
target = null;
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ public class EntityCollisions{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void move(Hitboxc entity, float deltax, float deltay, SolidPred solidCheck){
|
public void move(Hitboxc entity, float deltax, float deltay, SolidPred solidCheck){
|
||||||
|
if(Math.abs(deltax) < 0.0001f & Math.abs(deltay) < 0.0001f) return;
|
||||||
|
|
||||||
boolean movedx = false;
|
boolean movedx = false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user