Fix rounding issue with the collision detection that could cause problems with the portals

master
Fernando Carmona Varo 2015-11-29 11:28:25 +01:00
parent 8665345932
commit 42b950af22
2 changed files with 2 additions and 2 deletions

View File

@ -268,7 +268,7 @@ local function on_player_gamestep(player, gameid)
{x=-0.5,y=0.5,z=-0.25},
}
for _,pos in pairs(positions) do
pos = vector.add(player_pos, pos)
pos = vector.round(vector.add(player_pos, pos))
local node = minetest.get_node(pos)
local nodedef = minetest.registered_nodes[node.name]

View File

@ -270,7 +270,7 @@ local function on_player_gamestep(player, gameid)
{x=-0.5,y=0.5,z=-0.5},
}
for _,pos in pairs(positions) do
pos = vector.add(player_pos, pos)
pos = vector.round(vector.add(player_pos, pos))
local node = minetest.get_node(pos)
local nodedef = minetest.registered_nodes[node.name]