Merge pull request #11039 from obrakmann/fix-opening-ro-files-as-rw

Fix opening the scriptwrapper.lua file as read-write
This commit is contained in:
Paul Chote
2016-04-03 18:40:01 +01:00

View File

@@ -160,7 +160,7 @@ namespace OpenRA.Scripting
.ToArray();
runtime.Globals["GameDir"] = Platform.GameDir;
runtime.DoBuffer(File.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua"), FileMode.Open).ReadAllText(), "scriptwrapper.lua").Dispose();
runtime.DoBuffer(File.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua"), FileMode.Open, FileAccess.Read).ReadAllText(), "scriptwrapper.lua").Dispose();
tick = (LuaFunction)runtime.Globals["Tick"];
// Register globals