| 338 | } |
| 339 | |
| 340 | void NetObject::onCameraScopeQuery(NetConnection *cr, CameraScopeQuery* /*camInfo*/) |
| 341 | { |
| 342 | // default behavior - |
| 343 | // ghost everything that is ghostable |
| 344 | |
| 345 | for (SimSetIterator obj(Sim::getRootGroup()); *obj; ++obj) |
| 346 | { |
| 347 | NetObject* nobj = dynamic_cast<NetObject*>(*obj); |
| 348 | if (nobj) |
| 349 | { |
| 350 | AssertFatal(!nobj->mNetFlags.test(NetObject::Ghostable) || !nobj->mNetFlags.test(NetObject::IsGhost), |
| 351 | "NetObject::onCameraScopeQuery: object marked both ghostable and as ghost"); |
| 352 | |
| 353 | // Some objects don't ever want to be ghosted |
| 354 | if (!nobj->mNetFlags.test(NetObject::Ghostable)) |
| 355 | continue; |
| 356 | if (!nobj->mNetFlags.test(NetObject::ScopeAlways)) |
| 357 | { |
| 358 | // it's in scope... |
| 359 | cr->objectInScope(nobj); |
| 360 | } |
| 361 | } |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | //----------------------------------------------------------------------------- |
| 366 |
no test coverage detected