Don’t regenerate the lua player bindings each query.

This commit is contained in:
Paul Chote
2014-10-12 10:21:54 +13:00
parent f800cd7f02
commit 19760b44cc

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]