mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-19 19:35:26 +00:00
more console cleanups
(cherry picked from commit a66ff6407cdcdf233996f49c74d7a42537314562)
This commit is contained in:
parent
339393aa85
commit
fed381c945
3 changed files with 38 additions and 36 deletions
|
|
@ -644,18 +644,20 @@ ImplementEnumType(_TamlFormatMode,
|
|||
// Fetch field count.
|
||||
const U32 fieldCount = fieldList.size();
|
||||
|
||||
ConsoleObject* defaultConObject;
|
||||
SimObject* defaultObject;
|
||||
ConsoleObject* defaultConObject = NULL;
|
||||
SimObject* defaultObject = NULL;
|
||||
if (!getWriteDefaults())
|
||||
{
|
||||
// Create a default object of the same type
|
||||
defaultConObject = ConsoleObject::create(pSimObject->getClassName());
|
||||
if (!defaultConObject)
|
||||
return;
|
||||
defaultObject = dynamic_cast<SimObject*>(defaultConObject);
|
||||
|
||||
// ***Really*** shouldn't happen
|
||||
if (!defaultObject)
|
||||
return;
|
||||
}
|
||||
// ***Really*** shouldn't happen
|
||||
if (!defaultConObject || !defaultObject)
|
||||
return;
|
||||
|
||||
// Iterate fields.
|
||||
U8 arrayDepth = 0;
|
||||
|
|
@ -754,7 +756,7 @@ ImplementEnumType(_TamlFormatMode,
|
|||
}
|
||||
|
||||
// Save field/value.
|
||||
if (arrayDepth > 0 || pField->elementCount > 1)
|
||||
if (currentArrayNode && (arrayDepth > 0 || pField->elementCount > 1))
|
||||
currentArrayNode->getChildren()[elementIndex]->addField(fieldName, pFieldValue);
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue