Merge pull request #6736 from pchote/fix-player-binding

Don’t regenerate the Lua player bindings each query.
This commit is contained in:
Matthias Mailänder
2014-10-12 09:43:42 +02:00

View File

@@ -116,7 +116,8 @@ namespace OpenRA
Lazy<ScriptPlayerInterface> luaInterface;
public void OnScriptBind(ScriptContext context)
{
luaInterface = Exts.Lazy(() => new ScriptPlayerInterface(context, this));
if (luaInterface == null)
luaInterface = Exts.Lazy(() => new ScriptPlayerInterface(context, this));
}
public LuaValue this[LuaRuntime runtime, LuaValue keyValue]