diff --git a/Engine/source/T3D/shapeBase.cpp b/Engine/source/T3D/shapeBase.cpp index 72f537141..b84b32956 100644 --- a/Engine/source/T3D/shapeBase.cpp +++ b/Engine/source/T3D/shapeBase.cpp @@ -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()) diff --git a/Templates/BaseGame/game/core/clientServer/scripts/server/server.cs b/Templates/BaseGame/game/core/clientServer/scripts/server/server.cs index d5ab978c3..c4d8050a1 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/server/server.cs +++ b/Templates/BaseGame/game/core/clientServer/scripts/server/server.cs @@ -185,6 +185,7 @@ function createServer(%serverType, %levelAsset) function onServerCreated() { + new PersistenceManager( ServerAssetValidator ); // Server::GameType is sent to the master server. // This variable should uniquely identify your game and/or mod. $Server::GameType = $appName; @@ -208,6 +209,7 @@ function onServerCreated() // Keep track of when the game started $Game::StartTime = $Sim::Time; + ServerAssetValidator.saveDirty(); } /// Shut down the server