int main(int argc, char*argv[]) { TestVisibility(); TestGetRegion(); TestConstructors(); return EXIT_SUCCESS; }
//----------------------------------------------------------------------------- // Purpose: Draws the object //----------------------------------------------------------------------------- int C_NPC_Barnacle::InternalDrawModel( int flags ) { if ( !GetModel() ) return 0; // Make sure hdr is valid for drawing if ( !GetModelPtr() ) return 0; // UNDONE: With a bit of work on the model->world transform, we can probably // move the frustum culling into the client DLL entirely. Then TestVisibility() // can just return true/false and only be called when frustumcull is set. if ( flags & STUDIO_FRUSTUMCULL ) { switch ( TestVisibility() ) { // not visible, don't draw case VIS_NOT_VISIBLE: return 0; // definitely visible, disable engine check case VIS_IS_VISIBLE: flags &= ~STUDIO_FRUSTUMCULL; break; default: case VIS_USE_ENGINE: break; } } Vector vecMins, vecMaxs; GetRenderBounds( vecMins, vecMaxs ); int drawn = modelrender->DrawModel( flags, this, GetModelInstance(), index, GetModel(), GetAbsOrigin(), GetAbsAngles(), GetSequence(), m_nSkin, m_nBody, m_nHitboxSet, &GetAbsMins(), &GetAbsMaxs() ); if ( vcollide_wireframe.GetBool() ) { if ( IsRagdoll() ) { m_pRagdoll->DrawWireframe(); } else { vcollide_t *pCollide = modelinfo->GetVCollide( GetModelIndex() ); if ( pCollide && pCollide->solidCount == 1 ) { static color32 debugColor = {0,255,255,0}; matrix3x4_t matrix; AngleMatrix( GetAbsAngles(), GetAbsOrigin(), matrix ); engine->DebugDrawPhysCollide( pCollide->solids[0], NULL, matrix, debugColor ); } } } return drawn; }