Update main.lua
This commit is contained in:
1 parent
451d0ddafd
commit
82d5f4ec3e
1 file changed
+2
-1
@@ -862,7 +862,8 @@ local function attemptPathfind(entity)
|
|||||||
pathsChecked[entity.InitSeed] = true
|
pathsChecked[entity.InitSeed] = true
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
if EID.GameUpdateCount - lastPathfindFrame < 10 then return false end
|
-- Don't reattempt pathfinding more than 3 times a second, unless this is a new entity
|
||||||
|
if pathsChecked[entity.InitSeed] == false and EID.GameUpdateCount - lastPathfindFrame < 10 then return false end
|
||||||
|
|
||||||
-- Spawn a custom NPC entity to attempt a pathfind to the target pickup, then remove it afterwards
|
-- Spawn a custom NPC entity to attempt a pathfind to the target pickup, then remove it afterwards
|
||||||
pathCheckerEntity = game:Spawn(17, 3169, EID.player.Position, nullVector, EID.player, 0, 4354)
|
pathCheckerEntity = game:Spawn(17, 3169, EID.player.Position, nullVector, EID.player, 0, 4354)
|
||||||
|
|||||||
Reference in new issue
Block a user