Workaround for step height weirdness

master
Ciaran Gultnieks 2014-04-06 21:41:19 +01:00
parent f2ff5b6eba
commit 86dff69786
1 changed files with 6 additions and 2 deletions

View File

@ -127,10 +127,14 @@ people.actions.go = function(state)
return true
end
local thispathpos = vector.new(state.pos.x, state.pos.y - 0.5, state.pos.z)
-- extra 0.5 allowing for dodgy step-ups, for now...
local thispathpos = vector.round({x=state.pos.x, y=state.pos.y + 0.5, z=state.pos.z})
thispathpos.y = thispathpos.y - 1
local nextpathpos = footpath_findnext(thispathpos, state.action.lastpathpos, false)
if not nextpathpos then
dbg.v1(state.ent.name.." can't find next footpath node")
dbg.v1(state.ent.name.." can't find next footpath node at "..
minetest.pos_to_string(thispathpos).." after "..
minetest.pos_to_string(state.action.lastpathpos))
return true
end