Made Pathfinder shopkeeper a bit easier identifyable by other mods. Also fixed issue where his shadow would be visible

This commit is contained in:
Wofsauge committed 2022-04-03 23:40:47 +02:00
1 parent 8d2b86bcdf
commit 034b9e453d
1 file changed
+3 -2
+3 -2
View File
@@ -1039,8 +1039,9 @@ local function attemptPathfind(entity)
if pathsChecked[entity.InitSeed] == false and EID.GameUpdateCount - lastPathfindFrame < 10 then return false end
-- Spawn a Shopkeeper entity to attempt a pathfind to the target pickup, then remove it afterwards
pathCheckerEntity = game:Spawn(17, 0, EID.player.Position, nullVector, EID.player, 0, 4354)
pathCheckerEntity = game:Spawn(17, 0, EID.player.Position, nullVector, EID.player, 6969, 4354)
pathCheckerEntity:GetData()["EID_Pathfinder"] = true
pathCheckerEntity.Visible = false
local success = pathCheckerEntity:ToNPC().Pathfinder:HasPathToPos(entity.Position, false)
pathsChecked[entity.InitSeed] = success
pathCheckerEntity:Remove()