Handle unknown states

This commit is contained in:
Fesiug 2023-12-31 00:57:08 -05:00
parent 1a38d4590b
commit 4c4b6b08e7
1 changed files with 7 additions and 1 deletions

View File

@ -230,7 +230,13 @@ ENT.States = {
local result = self:MoveToPos( em.GoToLastKnown, { lookahead = 100, tolerance = 32, draw = true, repath = 0.5 } )
if result == "ok" then
em.GoToLastKnown = true
self:DebugChat("Went to last known position")
self:DebugChat("Went to last known position of " .. re:Nick())
elseif result == "stuck" then
em.GoToLastKnown = true
self:DebugChat("Failed to go to last known position of " .. re:Nick() .. " at " .. tostring(self:GetPos()))
else
em.GoToLastKnown = true
self:DebugChat("Unkown state " .. result .. " while going to " .. re:Nick() .. " at " .. tostring(self:GetPos()))
end
end
end