mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
GameBaseData::onNewDataBlock reload state
if live editing a datablock for an object you're piloting, reapply the control post onadd
This commit is contained in:
parent
a80502d50d
commit
15f619c1aa
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue