From 15f619c1aa0bcf9b757bf102537bb1037f1fd478 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 19 Jan 2026 12:00:10 -0600 Subject: [PATCH] GameBaseData::onNewDataBlock reload state if live editing a datablock for an object you're piloting, reapply the control post onadd --- .../game/core/utility/scripts/gameObjectManagement.tscript | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Templates/BaseGame/game/core/utility/scripts/gameObjectManagement.tscript b/Templates/BaseGame/game/core/utility/scripts/gameObjectManagement.tscript index 51a4566fa..7fde01a71 100644 --- a/Templates/BaseGame/game/core/utility/scripts/gameObjectManagement.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/gameObjectManagement.tscript @@ -82,10 +82,17 @@ function GameBaseData::onNewDataBlock(%this, %obj, %reload) { if (%reload) { + %client = ""; + if (isObject(%obj.client)) + %client = %obj.client; + if(%this.isMethod("onRemove")) %this.onRemove(%obj); if(%this.isMethod("onAdd")) %this.onAdd(%obj); + + if (%client) + %client.setControlObject(%obj); } }