File bam-0.5.patch of Package teeworlds

From d6f3cc159257a2d6033e3ef46906c72c9db1b9eb Mon Sep 17 00:00:00 2001
From: m!nus <minus+github@mnus.de>
Date: Sun, 19 Jun 2016 00:14:13 +0200
Subject: [PATCH] updated build files for bam 0.5

changes makes them incompatible with bam 0.4
---
 bam.lua       | 2 +-
 configure.lua | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/bam.lua b/bam.lua
index e122545..d963948 100644
--- a/bam.lua
+++ b/bam.lua
@@ -1,4 +1,4 @@
-CheckVersion("0.4")
+CheckVersion("0.5")
 
 Import("configure.lua")
 Import("other/sdl/sdl.lua")
diff --git a/configure.lua b/configure.lua
index 2db70cc..aa6da6a 100644
--- a/configure.lua
+++ b/configure.lua
@@ -72,13 +72,13 @@ function NewConfig(on_configured_callback)
 	end
 
 	config.Load = function(self, filename)
-		local options_func = loadfile(filename)
 		local options_table = {}
+		local options_func = loadfile(filename, nil, options_table)
 
 		if not options_func then
 			print("auto configuration")
 			self:Config(filename)
-			options_func = loadfile(filename)
+			options_func = loadfile(filename, nil, options_table)
 		end
 
 		if options_func then
@@ -86,7 +86,6 @@ function NewConfig(on_configured_callback)
 			for k,v in pairs(self.options) do
 				options_table[v.name] = {}
 			end
-			setfenv(options_func, options_table)
 
 			-- this is to make sure that we get nice error messages when
 			-- someone sets an option that isn't valid.