added math.randomseed(os.time())

This commit is contained in:
Brett O'Donnell 2012-09-27 12:51:03 +09:30
parent 33fdcc9644
commit fa196c50b4

View File

@ -37,6 +37,7 @@ end
deploy_building.deploy = function(originpos, placer, size)
-- load building data
math.randomseed(os.time())
local files = deploy_building.get_files(size)
local filepath = minetest.get_modpath("deploy_building").."/buildings/"..size.."/"..files[math.random(#files)]
local file, err = io.open(filepath, "rb")