Be a bit more defensive about go action

master
Ciaran Gultnieks 2014-04-12 12:42:45 +01:00
parent b2148573df
commit e4c8f373e8
1 changed files with 5 additions and 0 deletions

View File

@ -105,6 +105,11 @@ people.actions.go = function(state)
return true
end
if not state.action.name then
dbg.v1(state.ent.name.." unexpectedly missing destination name - aborting go action - fix this!")
return true
end
-- We're at a junction
dbg.v2(state.ent.name.." is at footpath junction "..curpatharea.name.." - looking for route to "..state.action.name)
state.action.lastpathpos = vector.new(state.pos.x, state.pos.y - 0.5, state.pos.z)