void GhostConnection::objectLocalScopeAlways(NetObject *obj) { if(!doesGhostFrom()) return; objectInScope(obj); for(GhostInfo *walk = mGhostLookupTable[obj->getHashId() & GhostLookupTableMask]; walk; walk = walk->nextLookupInfo) { if(walk->obj != obj) continue; walk->flags |= GhostInfo::ScopeLocalAlways; return; } }
bool GhostManager::onAdd() { if(!Parent::onAdd()) return false; if (!getId()) manager->assignId(this); // iterate through the ghost always objects and InScope them... SimSet *ghostAlwaysSet = (SimSet *) manager->findObject(SimGhostAlwaysSetId); SimSet::iterator i; for(i = ghostAlwaysSet->begin(); i != ghostAlwaysSet->end(); i++) { AssertFatal(dynamic_cast<SimNetObject *>(*i) != NULL, "Non SimNetObject in GhostAlwaysSet"); SimNetObject *obj = (SimNetObject *)(*i); if(obj->netFlags.test(SimNetObject::Ghostable)) objectInScope(obj); } // add to the ghostManager set addToSet(GhostManagerSetId); return true; }