Skip to content

Commit b864cb3

Browse files
committed
Dumbass :D
1 parent 22709c2 commit b864cb3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Data/Base.rte/AI/HumanBehaviors.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,8 +992,9 @@ function HumanBehaviors.WeaponSearch(AI, Owner, Abort)
992992
local deviceID = device.UniqueID;
993993
SceneMan.Scene:CalculatePathAsync(
994994
function(pathRequest)
995-
local pathLength = pathRequest.PathLength * pathMultipler;
996-
if pathLength < maxPathLength then
995+
local pathLength = pathRequest.PathLength;
996+
if pathRequest.Status ~= PathRequest.NoSolution and pathLength < maxPathLength then
997+
local score = pathLength * pathMultipler;
997998
table.insert(devicesToPickUp, {deviceId = deviceID, score = score});
998999
end
9991000
searchesRemaining = searchesRemaining - 1;

0 commit comments

Comments
 (0)