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