Merge pull request #1658 from Azaezel/alpha41/itsAboutControl

GameBaseData::onNewDataBlock reload state
This commit is contained in:
Brian Roberts 2026-01-19 21:37:04 -06:00 committed by GitHub
commit 5361e59a2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
} }
} }