void DMap::ResetTextures( const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName, int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation ){ for ( list<DEntity *>::const_iterator texEntity = entityList.begin(); texEntity != entityList.end(); texEntity++ ) { if ( !stricmp( "worldspawn", ( *texEntity )->m_Classname ) ) { ( *texEntity )->ResetTextures( textureName, fScale, fShift, rotation, newTextureName, bResetTextureName, bResetScale, bResetShift, bResetRotation, TRUE ); } else { if ( ( *texEntity )->ResetTextures( textureName, fScale, fShift, rotation, newTextureName, bResetTextureName, bResetScale, bResetShift, bResetRotation, FALSE ) ) { RebuildEntity( *texEntity ); } } } }
void DMap::ResetTextures( const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName, int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation ){ for ( std::list<DEntity *>::const_iterator texEntity = entityList.begin(); texEntity != entityList.end(); texEntity++ ) { if ( string_equal_nocase( "worldspawn", ( *texEntity )->m_Classname ) ) { ( *texEntity )->ResetTextures( textureName, fScale, fShift, rotation, newTextureName, bResetTextureName, bResetScale, bResetShift, bResetRotation, true ); } else { if ( ( *texEntity )->ResetTextures( textureName, fScale, fShift, rotation, newTextureName, bResetTextureName, bResetScale, bResetShift, bResetRotation, false ) ) { RebuildEntity( *texEntity ); } } } }
int DMap::FixBrushes( bool rebuild ){ int count = 0; for ( list<DEntity *>::const_iterator fixEntity = entityList.begin(); fixEntity != entityList.end(); fixEntity++ ) { int cnt; if ( !stricmp( "worldspawn", ( *fixEntity )->m_Classname ) ) { cnt = ( *fixEntity )->FixBrushes( rebuild ); } else { cnt = ( *fixEntity )->FixBrushes( FALSE ); if ( cnt && rebuild ) { RebuildEntity( *fixEntity ); } } count += cnt; } return count; }