mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Merge pull request #413 from Azaezel/alpha40_ServerAssetValidator
add validation flagging for server objects
This commit is contained in:
commit
baeabb4a51
2 changed files with 9 additions and 0 deletions
|
|
@ -68,6 +68,7 @@
|
||||||
#include "renderInstance/renderOcclusionMgr.h"
|
#include "renderInstance/renderOcclusionMgr.h"
|
||||||
#include "core/stream/fileStream.h"
|
#include "core/stream/fileStream.h"
|
||||||
#include "T3D/accumulationVolume.h"
|
#include "T3D/accumulationVolume.h"
|
||||||
|
#include "console/persistenceManager.h"
|
||||||
|
|
||||||
IMPLEMENT_CO_DATABLOCK_V1(ShapeBaseData);
|
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
|
//Legacy catch
|
||||||
if (shapeName != StringTable->EmptyString())
|
if (shapeName != StringTable->EmptyString())
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,7 @@ function createServer(%serverType, %levelAsset)
|
||||||
|
|
||||||
function onServerCreated()
|
function onServerCreated()
|
||||||
{
|
{
|
||||||
|
new PersistenceManager( ServerAssetValidator );
|
||||||
// Server::GameType is sent to the master server.
|
// Server::GameType is sent to the master server.
|
||||||
// This variable should uniquely identify your game and/or mod.
|
// This variable should uniquely identify your game and/or mod.
|
||||||
$Server::GameType = $appName;
|
$Server::GameType = $appName;
|
||||||
|
|
@ -208,6 +209,7 @@ function onServerCreated()
|
||||||
|
|
||||||
// Keep track of when the game started
|
// Keep track of when the game started
|
||||||
$Game::StartTime = $Sim::Time;
|
$Game::StartTime = $Sim::Time;
|
||||||
|
ServerAssetValidator.saveDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shut down the server
|
/// Shut down the server
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue