int PhysicsDirect::getBodyUniqueId(int serialIndex) const { if ((serialIndex >= 0) && (serialIndex < getNumBodies())) { return m_data->m_bodyJointMap.getKeyAtIndex(serialIndex).getUid1(); } return -1; }
void Jumper::setBody(engine::IClump* clump, unsigned int bodyId, Jumper* jumper) { assert( bodyId < getNumBodies( clump ) ); unsigned int flags; for( unsigned int i=0; i<getNumBodies(clump); i++ ) { flags = 0; if( i == bodyId ) { flags = engine::afRender | engine::afCollision; if( jumper && jumper->isPlayer() ) { int shadows = atoi( Gameplay::iGameplay->getConfigElement( "video" )->Attribute( "shadows" ) ); if( shadows ) flags = flags | engine::afCastShadow; } } getBody( clump, i )->setFlags( flags ); } }