removed obsolete rotate function

master
Sokomine 2014-09-22 21:25:14 +02:00
parent 896b3dba01
commit 1389ffbecb
1 changed files with 0 additions and 42 deletions

View File

@ -32,45 +32,3 @@ mg_villages.get_param2_rotated = function( paramtype2, p2 )
return p2r;
end
mg_villages.rotate_scm_once = function(scm)
local ysize = #scm
local xsize = #scm[1]
local zsize = #scm[1][1]
new_scm = {}
for i=1, ysize do
new_scm[i] = {}
for j=1, zsize do
new_scm[i][j] = {}
end
end
for y = 1, ysize do
for x = 1, xsize do
for z = 1, zsize do
local old = scm[y][x][z]
local newx = z
local newz = xsize-x+1
if type(old) ~= "table" or old.rotation == nil then
new_scm[y][newx][newz] = old
elseif old.rotation == "wallmounted" then
new = mg_villages.deepcopy(old)
new.node.param2 = mg_villages.rotate_wallmounted(new.node.param2)
new_scm[y][newx][newz] = new
elseif old.rotation == "facedir" then
new = mg_villages.deepcopy(old)
new.node.param2 = mg_villages.rotate_facedir(new.node.param2)
new_scm[y][newx][newz] = new
end
end
end
end
return new_scm
end
-- called from villages.lua
mg_villages.rotate_scm = function(scm, times)
for i=1, times do
scm = mg_villages.rotate_scm_once(scm)
end
return scm
end