summaryrefslogtreecommitdiff
path: root/src/irr_v2d.h
Commit message (Expand)AuthorAge
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Optimize headersPerttu Ahola2012-06-17
id='n16' href='#n16'>16 17 18 19 20 21 22 23 24 25 26 27
--trackdb_legacy.lua
--loads the (old) track database. the only use for this is to provide data for rails that haven't been written into the ndb database.
--nothing will be saved.
--if the user thinks that he has loaded every track in his world at least once, he can delete the track database.

--trackdb[[y][x][z]={conn1, conn2, rely1, rely2, railheight}


--trackdb keeps its own save file.
advtrains.fpath_tdb=minetest.get_worldpath().."/advtrains_trackdb2"
local file, err = io.open(advtrains.fpath_tdb, "r")
if not file then
	atprint("Not loading a trackdb file.")
else
	local tbl = minetest.deserialize(file:read("*a"))
	if type(tbl) == "table" then
		advtrains.trackdb=tbl
		atprint("Loaded trackdb file.")
	end
	file:close()
end