Fix global variable bug

This commit is contained in:
Wuzzy 2016-03-26 20:27:14 +01:00
parent 7ff7f5c24c
commit 514ec4616a
1 changed files with 3 additions and 9 deletions

View File

@ -119,7 +119,7 @@ local function make_mine(mpos,p2,p3, vm_data, vx_area,cnt)
local pos = {x=mpos.x,y=mpos.y,z=mpos.z} local pos = {x=mpos.x,y=mpos.y,z=mpos.z}
for j=0,12,1 do for j=0,12,1 do
local switch = cnt+1 local switch = cnt+1
n_switch = math.random(1,4) local n_switch = math.random(1,4)
while check_dir(n_switch,switch) == true do while check_dir(n_switch,switch) == true do
n_switch = math.random(1,4) n_switch = math.random(1,4)
end end
@ -132,14 +132,8 @@ local function make_mine(mpos,p2,p3, vm_data, vx_area,cnt)
pillar = ids.fence pillar = ids.fence
pillar_top = ids.wood pillar_top = ids.wood
end end
local x1 local x1, x2, x3, x4, x5
local x2 local z1, z2, z3, z4, z5
local x3
local x4
local z1
local z2
local z3
local z4
if switch == 1 then if switch == 1 then
x1 = pos.x+1 x1 = pos.x+1
x2 = pos.x x2 = pos.x