From 04d61f465a4f90ac0d547762c08135137abcf68c Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 28 Sep 2014 14:27:18 +1300 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20rebuild=20the=20actor=20binding?= =?UTF-8?q?s=20every=20query.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenRA.Game/Actor.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index 94b3da5818..2b208dd522 100644 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -265,7 +265,8 @@ namespace OpenRA Lazy 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]