MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / onAdd

Method onAdd

Engine/source/console/simDatablock.cpp:58–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56//-----------------------------------------------------------------------------
57
58bool SimDataBlock::onAdd()
59{
60 Parent::onAdd();
61
62 // This initialization is done here, and not in the constructor,
63 // because some jokers like to construct and destruct objects
64 // (without adding them to the manager) to check what class
65 // they are.
66 modifiedKey = ++sNextModifiedKey;
67 AssertFatal(sNextObjectId <= DataBlockObjectIdLast,
68 "Exceeded maximum number of data blocks");
69
70 // add DataBlock to the DataBlockGroup unless it is client side ONLY DataBlock
71 if ( !isClientOnly() )
72 if (SimGroup* grp = Sim::getDataBlockGroup())
73 grp->addObject(this);
74
75 Sim::getDataBlockSet()->addObject( this );
76
77 return true;
78}
79
80//-----------------------------------------------------------------------------
81

Callers

nothing calls this directly

Calls 2

getDataBlockGroupFunction · 0.85
addObjectMethod · 0.45

Tested by

no test coverage detected