Keep inventory when zipping

This commit is contained in:
Aaron Suen 2021-03-17 08:17:01 -04:00
parent 1137805e00
commit 748d81f170
2 changed files with 2 additions and 1 deletions

View File

@ -189,6 +189,7 @@ local function playercheck(player, stepdata)
logact("%s correcting %0.2f",
player:get_player_name(),
vector.distance(pos, data.pos))
data.pos.keepinv = true
player:set_pos(data.pos)
return nodecore.player_visible(player) and energized(pos)
end
@ -225,7 +226,7 @@ local function playercheck(player, stepdata)
data.oldpos = appendpos(data.oldpos or {}, data.pos)
data.pos = hit
zipdata_set(player, data)
player:set_pos({x = hit.x, y = hit.y - yoffs, z = hit.z})
player:set_pos({x = hit.x, y = hit.y - yoffs, z = hit.z, keepinv = true})
return nodecore.player_visible(player) and sparkly(p, hit)
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 45 KiB