Skip to content

Commit 311e8a4

Browse files
committed
Adjusted estimate-jump-height to work a little better
* return FLT_MAX for infinite jump height * don't reduce final height- it doesn't actually improve behaviour in a lot of cases, it's more consistent to let the AI try to take a big vertical climb than many smaller ones
1 parent d6d3866 commit 311e8a4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Source/Entities/AHuman.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,7 @@ float AHuman::EstimateJumpHeight() const {
10071007
if (currentYVelocity + yGravity >= currentYVelocity) {
10081008
// Velocity is too big or gravity is too small. Either way, this will loop forever now.
10091009
// Just assume that we can reach the stars.
1010-
totalHeight = g_SceneMan.GetSceneHeight() * c_MPP;
1011-
break;
1010+
return FLT_MAX;
10121011
}
10131012

10141013
currentYVelocity += yGravity;
@@ -1022,9 +1021,7 @@ float AHuman::EstimateJumpHeight() const {
10221021
}
10231022
}
10241023

1025-
float finalHeightMultipler = 0.6f; // Make us think we can do less because AI path following is shit
1026-
1027-
return totalHeight * c_MPP * finalHeightMultipler;
1024+
return totalHeight * c_MPP;
10281025
}
10291026

10301027
bool AHuman::EquipShield() {

0 commit comments

Comments
 (0)