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,6 +265,7 @@ namespace OpenRA
Lazy<ScriptActorInterface> luaInterface; Lazy<ScriptActorInterface> luaInterface;
public void OnScriptBind(ScriptContext context) public void OnScriptBind(ScriptContext context)
{ {
if (luaInterface == null)
luaInterface = Exts.Lazy(() => new ScriptActorInterface(context, this)); luaInterface = Exts.Lazy(() => new ScriptActorInterface(context, this));
} }