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
|
||||
|
||||
Reference in New Issue
Block a user