Merge remote-tracking branch 'devhead/Preview4_0' into tsneo

# Conflicts:
#	Templates/BaseGame/game/data/ui/guis/loadingGui.gui
#	Templates/BaseGame/game/data/ui/guis/mainMenu.gui
#	Templates/BaseGame/game/tools/MainEditor/guis/MainEditorWindow.gui
#	Templates/BaseGame/game/tools/assetBrowser/guis/assetPreviewButtonsTemplate.gui
#	Templates/BaseGame/game/tools/forestEditor/brushes.tscript
This commit is contained in:
Jeff Hutchinson 2021-08-13 20:14:39 -04:00
commit 717c7acca9
2266 changed files with 48780 additions and 26034 deletions

View file

@ -339,11 +339,12 @@ void SimObject::writeFields(Stream &stream, U32 tabStop)
// detect and collapse relative path information
char fnBuf[1024];
if (f->type == TypeFilename ||
if (f->type == TypeFilename ||
f->type == TypeStringFilename ||
f->type == TypeImageFilename ||
f->type == TypeImageFilename ||
f->type == TypePrefabFilename ||
f->type == TypeShapeFilename)
f->type == TypeShapeFilename ||
f->type == TypeSoundFilename )
{
Con::collapseScriptFilename(fnBuf, 1024, val);
val = fnBuf;
@ -919,7 +920,15 @@ void SimObject::assignFieldsFrom(SimObject *parent)
dMemset( bufferSecure, 0, 2048 );
dMemcpy( bufferSecure, szBuffer, dStrlen( szBuffer ) );
if((*f->setDataFn)( this, NULL, bufferSecure ) )
//If we have an index worth mentioning, process it for pass-along as well to ensure we set stuff correctly
char* elementIdxBuffer = nullptr;
if (f->elementCount > 1)
{
elementIdxBuffer = Con::getArgBuffer(256);
dSprintf(elementIdxBuffer, 256, "%i", j);
}
if((*f->setDataFn)( this, elementIdxBuffer, bufferSecure ) )
Con::setData(f->type, (void *) (((const char *)this) + f->offset), j, 1, &fieldVal, f->table);
if (f->networkMask != 0)
@ -3176,6 +3185,31 @@ DefineEngineMethod( SimObject, getField, const char*, ( S32 index ),,
return "";
}
DefineEngineFunction(getClassHierarchy, const char*, (const char* name), ,
"Returns the inheritance hierarchy for a given class.")
{
AbstractClassRep* pRep = AbstractClassRep::findClassRep(name);
if (!pRep)
{
//Con::errorf("%s does not exist", name);
return StringTable->EmptyString();
}
StringBuilder buffer;
while (pRep != NULL)
{
StringTableEntry className = pRep->getClassName();
buffer.append(className);
buffer.append(" ");
pRep = pRep->getParentClass();
}
String result = buffer.end().trim();
//Con::printf("getClassHierarchy for %s=%s", name, result.c_str());
return Con::getReturnBuffer(result.c_str());
}
//-----------------------------------------------------------------------------
#ifdef TORQUE_DEBUG