Keep inventory when zipping
This commit is contained in:
parent
1137805e00
commit
748d81f170
3
init.lua
3
init.lua
@ -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
|
||||
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 45 KiB |
Loading…
x
Reference in New Issue
Block a user