mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #1658 from Azaezel/alpha41/itsAboutControl
GameBaseData::onNewDataBlock reload state
This commit is contained in:
commit
5361e59a2d
1 changed files with 7 additions and 0 deletions
|
|
@ -82,10 +82,17 @@ function GameBaseData::onNewDataBlock(%this, %obj, %reload)
|
||||||
{
|
{
|
||||||
if (%reload)
|
if (%reload)
|
||||||
{
|
{
|
||||||
|
%client = "";
|
||||||
|
if (isObject(%obj.client))
|
||||||
|
%client = %obj.client;
|
||||||
|
|
||||||
if(%this.isMethod("onRemove"))
|
if(%this.isMethod("onRemove"))
|
||||||
%this.onRemove(%obj);
|
%this.onRemove(%obj);
|
||||||
if(%this.isMethod("onAdd"))
|
if(%this.isMethod("onAdd"))
|
||||||
%this.onAdd(%obj);
|
%this.onAdd(%obj);
|
||||||
|
|
||||||
|
if (%client)
|
||||||
|
%client.setControlObject(%obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue