mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-07 06:20: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)
|
||||
{
|
||||
%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