| 324 | } |
| 325 | |
| 326 | void NetObject::onCameraScopeQuery(NetConnection *cr, CameraScopeQuery* /*camInfo*/) |
| 327 | { |
| 328 | // default behavior - |
| 329 | // ghost everything that is ghostable |
| 330 | |
| 331 | for (SimSetIterator obj(Sim::getRootGroup()); *obj; ++obj) |
| 332 | { |
| 333 | NetObject* nobj = dynamic_cast<NetObject*>(*obj); |
| 334 | if (nobj) |
| 335 | { |
| 336 | AssertFatal(!nobj->mNetFlags.test(NetObject::Ghostable) || !nobj->mNetFlags.test(NetObject::IsGhost), |
| 337 | "NetObject::onCameraScopeQuery: object marked both ghostable and as ghost"); |
| 338 | |
| 339 | // Some objects don't ever want to be ghosted |
| 340 | if (!nobj->mNetFlags.test(NetObject::Ghostable)) |
| 341 | continue; |
| 342 | if (!nobj->mNetFlags.test(NetObject::ScopeAlways)) |
| 343 | { |
| 344 | // it's in scope... |
| 345 | cr->objectInScope(nobj); |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | //----------------------------------------------------------------------------- |
| 352 |
no test coverage detected