Boosting Rise Speed (#4918)
This commit is contained in:
@@ -33,7 +33,7 @@ public class FormationAI extends AIController implements FormationMember{
|
||||
}
|
||||
|
||||
if(unit.type.canBoost){
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, unit.onSolid() ? 1f : leader.type.canBoost ? leader.elevation : 0f, 0.08f);
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, unit.onSolid() ? 1f : leader.type.canBoost ? leader.elevation : 0f, unit.type.riseSpeed);
|
||||
}
|
||||
|
||||
unit.controlWeapons(true, leader.isShooting);
|
||||
|
||||
@@ -44,7 +44,7 @@ public class GroundAI extends AIController{
|
||||
}
|
||||
|
||||
if(unit.type.canBoost && !unit.onSolid()){
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, 0.08f);
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, unit.type.riseSpeed);
|
||||
}
|
||||
|
||||
if(!Units.invalidateTarget(target, unit, unit.range()) && unit.type.rotateShooting){
|
||||
|
||||
@@ -309,6 +309,7 @@ public class UnitTypes implements ContentList{
|
||||
health = 320f;
|
||||
buildSpeed = 0.9f;
|
||||
armor = 4f;
|
||||
riseSpeed = 0.07f;
|
||||
|
||||
mineTier = 2;
|
||||
mineSpeed = 5f;
|
||||
@@ -364,6 +365,7 @@ public class UnitTypes implements ContentList{
|
||||
canBoost = true;
|
||||
armor = 9f;
|
||||
landShake = 2f;
|
||||
riseSpeed = 0.05f;
|
||||
|
||||
commandLimit = 10;
|
||||
mechFrontSway = 0.55f;
|
||||
@@ -416,6 +418,7 @@ public class UnitTypes implements ContentList{
|
||||
engineOffset = 12f;
|
||||
engineSize = 6f;
|
||||
lowAltitude = true;
|
||||
riseSpeed = 0.02f;
|
||||
|
||||
health = 7500f;
|
||||
armor = 9f;
|
||||
|
||||
@@ -134,7 +134,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
||||
//update some basic state to sync things
|
||||
if(unit.type.canBoost){
|
||||
Tile tile = unit.tileOn();
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, (tile != null && tile.solid()) || boosting ? 1f : 0f, 0.08f);
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, (tile != null && tile.solid()) || boosting ? 1f : 0f, unit.type.riseSpeed);
|
||||
}
|
||||
}else if((core = bestCore()) != null){
|
||||
//have a small delay before death to prevent the camera from jumping around too quickly
|
||||
|
||||
@@ -43,7 +43,7 @@ public class UnitType extends UnlockableContent{
|
||||
public Prov<? extends Unit> constructor;
|
||||
public Prov<? extends UnitController> defaultController = () -> !flying ? new GroundAI() : new FlyingAI();
|
||||
public float speed = 1.1f, boostMultiplier = 1f, rotateSpeed = 5f, baseRotateSpeed = 5f;
|
||||
public float drag = 0.3f, accel = 0.5f, landShake = 0f, rippleScale = 1f, fallSpeed = 0.018f;
|
||||
public float drag = 0.3f, accel = 0.5f, landShake = 0f, rippleScale = 1f, riseSpeed = 0.08f, fallSpeed = 0.018f;
|
||||
public float health = 200f, range = -1, armor = 0f, maxRange = -1f;
|
||||
public float crashDamageMultiplier = 1f;
|
||||
public boolean targetAir = true, targetGround = true;
|
||||
|
||||
Reference in New Issue
Block a user