mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
registerDatablock update in-place.
Maintains load order for datablock files that are overridden by registerDatablock.
This commit is contained in:
parent
840ad6d385
commit
6534957496
1 changed files with 7 additions and 5 deletions
|
|
@ -124,14 +124,16 @@ function SimSet::registerDatablock(%scopeSet, %datablockFilePath, %isExclusive)
|
|||
if ((!%locked && !%isExclusive)&&($reportModuleFileConflicts))
|
||||
error("found" SPC %datablockFilePath SPC "duplicate file!");
|
||||
if (!%locked || (%locked && %isExclusive))
|
||||
{
|
||||
DatablockFilesList.erase(%i);
|
||||
{ // Replacing an existing entry, update in-place
|
||||
DatablockFilesList.setKey(%fullPath, %i);
|
||||
DatablockFilesList.setValue(%isExclusive, %i);
|
||||
%locked = true; //Done, but don't return and bypass trace logging below
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if we're not locked, or we are exclusive, go ahead and add it to the pile
|
||||
//(ensures exclusives get re-added after that erasure)
|
||||
if (!%locked || %isExclusive)
|
||||
//if we're not locked, go ahead and add it to the pile
|
||||
if (!%locked)
|
||||
DatablockFilesList.add(%fullPath,%isExclusive);
|
||||
if ($traceModuleCalls)
|
||||
DatablockFilesList.echo();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue