Fix incorrect ModFiles.Open(resolved path).

This commit is contained in:
Paul Chote
2016-01-21 17:31:34 +00:00
parent c44f0d4120
commit b81d2d8333

View File

@@ -11,6 +11,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using Eluant;
@@ -158,7 +159,7 @@ namespace OpenRA.Scripting
.ToArray();
runtime.Globals["GameDir"] = Platform.GameDir;
runtime.DoBuffer(Game.ModData.ModFiles.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua")).ReadAllText(), "scriptwrapper.lua").Dispose();
runtime.DoBuffer(File.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua"), FileMode.Open).ReadAllText(), "scriptwrapper.lua").Dispose();
tick = (LuaFunction)runtime.Globals["Tick"];
// Register globals