Added descentSpeed to UnitType.java (#11490)
plus fixing up descriptions for accuracy on what they do
This commit is contained in:
@@ -55,7 +55,7 @@ public class GroundAI extends AIController{
|
||||
}
|
||||
|
||||
if(unit.type.canBoost && unit.elevation > 0.001f && !unit.onSolid()){
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, unit.type.riseSpeed);
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, unit.type.descentSpeed);
|
||||
}
|
||||
|
||||
faceTarget();
|
||||
|
||||
@@ -54,7 +54,7 @@ public class HugAI extends AIController{
|
||||
}
|
||||
|
||||
if(unit.type.canBoost && unit.elevation > 0.001f && !unit.onSolid()){
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, unit.type.riseSpeed);
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, unit.type.descentSpeed);
|
||||
}
|
||||
|
||||
faceTarget();
|
||||
|
||||
@@ -109,7 +109,8 @@ public class LogicAI extends AIController{
|
||||
}
|
||||
|
||||
if(unit.type.canBoost && !unit.type.flying){
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, Mathf.num(boost || unit.onSolid() || (unit.isFlying() && !unit.canLand())), unit.type.riseSpeed);
|
||||
boolean shouldBoost = boost || unit.onSolid() || (unit.isFlying() && !unit.canLand());
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, Mathf.num(shouldBoost), shouldBoost ? unit.type.riseSpeed : unit.type.descentSpeed);
|
||||
}
|
||||
|
||||
//look where moving if there's nothing to aim at
|
||||
|
||||
@@ -398,7 +398,7 @@ public class UnitTypes{
|
||||
health = 320f;
|
||||
buildSpeed = 0.5f;
|
||||
armor = 4f;
|
||||
riseSpeed = 0.07f;
|
||||
riseSpeed = descentSpeed = 0.07f;
|
||||
|
||||
mineTier = 2;
|
||||
mineSpeed = 3f;
|
||||
@@ -454,7 +454,7 @@ public class UnitTypes{
|
||||
canBoost = true;
|
||||
armor = 9f;
|
||||
mechLandShake = 2f;
|
||||
riseSpeed = 0.05f;
|
||||
riseSpeed = descentSpeed = 0.05f;
|
||||
|
||||
mechFrontSway = 0.55f;
|
||||
ammoType = new PowerAmmoType(1500);
|
||||
@@ -510,7 +510,7 @@ public class UnitTypes{
|
||||
engineOffset = 12f;
|
||||
engineSize = 6f;
|
||||
lowAltitude = true;
|
||||
riseSpeed = 0.02f;
|
||||
riseSpeed = descentSpeed = 0.02f;
|
||||
|
||||
health = 8200f;
|
||||
armor = 9f;
|
||||
|
||||
@@ -167,7 +167,8 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
||||
|
||||
//update some basic state to sync things
|
||||
if(unit.type.canBoost){
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, unit.onSolid() || boosting || (unit.isFlying() && !unit.canLand()) ? 1f : 0f, unit.type.riseSpeed);
|
||||
boolean shouldBoost = unit.onSolid() || boosting || (unit.isFlying() && !unit.canLand());
|
||||
unit.elevation = Mathf.approachDelta(unit.elevation, shouldBoost ? 1f : 0f, shouldBoost ? unit.type.riseSpeed : unit.type.descentSpeed);
|
||||
}
|
||||
}else if((core = bestCore()) != null){
|
||||
//have a small delay before death to prevent the camera from jumping around too quickly
|
||||
|
||||
@@ -113,7 +113,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
public void updateBoosting(boolean boost){
|
||||
if(!type.canBoost || dead) return;
|
||||
|
||||
elevation = Mathf.approachDelta(elevation, type.canBoost ? Mathf.num(boost || onSolid() || (isFlying() && !canLand())) : 0f, type.riseSpeed);
|
||||
boolean shouldBoost = boost || onSolid() || (isFlying() && !canLand());
|
||||
elevation = Mathf.approachDelta(elevation, type.canBoost ? Mathf.num(shouldBoost) : 0f, shouldBoost ? type.riseSpeed : type.descentSpeed);
|
||||
}
|
||||
|
||||
/** Move based on preferred unit movement type. */
|
||||
|
||||
@@ -77,7 +77,9 @@ public class UnitType extends UnlockableContent implements Senseable{
|
||||
rippleScale = 1f,
|
||||
/** boosting rise speed as fraction */
|
||||
riseSpeed = 0.08f,
|
||||
/** how fast this unit falls when not boosting */
|
||||
/** boosting descent speed as fraction */
|
||||
descentSpeed = 0.08f,
|
||||
/** how fast this unit falls upon death */
|
||||
fallSpeed = 0.018f,
|
||||
/** how many ticks it takes this missile to accelerate to full speed */
|
||||
missileAccelTime = 0f,
|
||||
|
||||
Reference in New Issue
Block a user