|
open file ModelMng.cpp
search
void CModelMng::MakePartsName( TCHAR* pszPartsName, LPCTSTR lpszRootName,
add code
void CModelMng::MakePartsName( TCHAR* pszPartsName, LPCTSTR lpszRootName, DWORD dwIndex, int nSex )
{
LPMODELELEM lpModelElem = GetModelElem( OT_ITEM, dwIndex );
#ifndef __PMA_WING
#ifdef __SECURITY_FIXES
if (strlen(lpModelElem->m_szPart) == 0)
return;
#endif // __SECURITY_FIXES
#endif // __PMA_WING
_tcscpy( pszPartsName, lpszRootName );
_tcscat( pszPartsName, _T( "_" ) );
if( nSex == SEX_SEXLESS || nSex == -1 )
_tcscat( pszPartsName, lpModelElem->m_szPart );
else
{
TCHAR* pszPart2 = strchr( lpModelElem->m_szPart, '/' );
if( pszPart2 == NULL )
_tcscat( pszPartsName, lpModelElem->m_szPart );
else
{
TCHAR szPartName[ 128 ];
if( nSex == SEX_MALE )
{
_tcscpy( szPartName, lpModelElem->m_szPart );
szPartName[ (int)pszPart2 - (int)lpModelElem->m_szPart ] = 0;
_tcscat( pszPartsName, szPartName );
}
else
{
_tcscat( pszPartsName, pszPart2 + 1 );
}
}
}
_tcscat( pszPartsName, _T( ".o3d" ) );
}
|