Added descentSpeed to UnitType.java (#11490)

plus fixing up descriptions for accuracy on what they do
This commit is contained in:
SomeonesShade
2026-02-06 11:50:31 +08:00
committed by GitHub
parent 6a2ef5a8ca
commit a2825a08a9
7 changed files with 14 additions and 9 deletions

View File

@@ -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();

View File

@@ -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();

View File

@@ -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