Merge pull request #413 from Azaezel/alpha40_ServerAssetValidator

add validation flagging for server objects
This commit is contained in:
Areloch 2020-12-28 00:14:46 -06:00 committed by GitHub
commit baeabb4a51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -68,6 +68,7 @@
#include "renderInstance/renderOcclusionMgr.h"
#include "core/stream/fileStream.h"
#include "T3D/accumulationVolume.h"
#include "console/persistenceManager.h"
IMPLEMENT_CO_DATABLOCK_V1(ShapeBaseData);
@ -359,6 +360,12 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
}
}
}
PersistenceManager *persistMgr;
if (!Sim::findObject("ServerAssetValidator", persistMgr)) Con::errorf("ServerAssetValidator not found!");
if (server && persistMgr && shapeAssetId == StringTable->EmptyString())
{
persistMgr->setDirty(this);
}
//Legacy catch
if (shapeName != StringTable->EmptyString())