Don’t rebuild the actor bindings every query.

This commit is contained in:
Paul Chote
2014-09-28 14:27:18 +13:00
parent ca6119821f
commit 04d61f465a

View File

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