| 522 | }; |
| 523 | |
| 524 | static void _scopeCallback( SceneObject* object, void* data ) |
| 525 | { |
| 526 | if( !object->isScopeable() ) |
| 527 | return; |
| 528 | |
| 529 | ScopingInfo* info = reinterpret_cast< ScopingInfo* >( data ); |
| 530 | NetConnection* connection = info->connection; |
| 531 | |
| 532 | F32 difSq = ( object->getWorldSphere().center - info->scopePoint ).lenSquared(); |
| 533 | if( difSq < info->scopeDistSquared ) |
| 534 | { |
| 535 | // Not even close, it's in... |
| 536 | connection->objectInScope( object ); |
| 537 | } |
| 538 | else |
| 539 | { |
| 540 | // Check a little more closely... |
| 541 | F32 realDif = mSqrt( difSq ); |
| 542 | if( realDif - object->getWorldSphere().radius < info->scopeDist) |
| 543 | connection->objectInScope( object ); |
| 544 | } |
| 545 | } |
| 546 | |
| 547 | void SceneManager::scopeScene( CameraScopeQuery* query, NetConnection* netConnection ) |
| 548 | { |
nothing calls this directly
no test coverage detected