Various tweaks
This commit is contained in:
@@ -14,6 +14,10 @@ public class FlyingAI extends AIController{
|
||||
public void update(){
|
||||
unit.rotation(unit.vel().angle());
|
||||
|
||||
if(unit.isFlying()){
|
||||
unit.wobble();
|
||||
}
|
||||
|
||||
if(Units.invalidateTarget(target, unit.team(), unit.x(), unit.y())){
|
||||
target = null;
|
||||
}
|
||||
|
||||
@@ -40,11 +40,6 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
|
||||
Vec2 t = Tmp.v3.set(vector).scl(floorSpeedMultiplier()); //target vector
|
||||
Tmp.v1.set(t).sub(vel).limit(acceleration * vector.len()); //delta vector
|
||||
vel.add(Tmp.v1);
|
||||
|
||||
//float mag = Tmp.v3.len() * acceleration;
|
||||
//vel.lerp(t, Tmp.v3.len() * acceleration);
|
||||
//vel.x = Mathf.approach(vel.x, t.x, mag);
|
||||
//vel.y = Mathf.approach(vel.y, t.y, mag);
|
||||
}
|
||||
|
||||
float floorSpeedMultiplier(){
|
||||
@@ -56,10 +51,6 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
|
||||
public void update(){
|
||||
Floor floor = floorOn();
|
||||
|
||||
if(isFlying() && !net.client()){
|
||||
wobble();
|
||||
}
|
||||
|
||||
if(isGrounded() && floor.isLiquid){
|
||||
if((splashTimer += Mathf.dst(deltaX(), deltaY())) >= 7f){
|
||||
floor.walkEffect.at(x, y, 0, floor.mapColor);
|
||||
|
||||
@@ -218,7 +218,7 @@ public class PlanetDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
if(sec.hostility >= 0f){
|
||||
//drawSelection(sec, Color.scarlet, 0.1f * sec.hostility);
|
||||
drawSelection(sec, Color.scarlet, 0.1f * sec.hostility);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class LaunchPad extends StorageBlock{
|
||||
|
||||
@Override
|
||||
public boolean acceptItem(Tilec source, Item item){
|
||||
return item.type == ItemType.material && items.total() < itemCapacity;
|
||||
return item.type == ItemType.material && super.acceptItem(source, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user