Fix: face sti files were not found for profiles >= 100 using ubFaceIndex < 100

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8569 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-06-05 20:56:08 +00:00
parent 9161863f6a
commit 0f31a8616a
2 changed files with 31 additions and 92 deletions
+2 -16
View File
@@ -2053,25 +2053,11 @@ BOOLEAN HandleSpecialTerroristFile( INT32 iFileNumber, STR sPictureName )
if (gGameExternalOptions.fReadProfileDataFromXML)
{
// HEADROCK PROFEX: Do not read direct profile number, instead, look inside the profile for a ubFaceIndex value.
if( usProfileIdsForTerroristFiles[ iFileNumber + 1 ] < 100 )
{
sprintf(sTemp, "%s%02d.sti", "FACES\\BIGFACES\\", gMercProfiles[ usProfileIdsForTerroristFiles[ iFileNumber + 1 ] ].ubFaceIndex);
}
else
{
sprintf(sTemp, "%s%03d.sti", "FACES\\BIGFACES\\", gMercProfiles[ usProfileIdsForTerroristFiles[ iFileNumber + 1 ] ].ubFaceIndex);
}
sprintf( sTemp, "%s%02d.sti", "FACES\\BIGFACES\\", gMercProfiles[usProfileIdsForTerroristFiles[iFileNumber + 1]].ubFaceIndex );
}
else
{
if( usProfileIdsForTerroristFiles[ iFileNumber + 1 ] < 100 )
{
sprintf(sTemp, "%s%02d.sti", "FACES\\BIGFACES\\", usProfileIdsForTerroristFiles[ iFileNumber + 1 ]);
}
else
{
sprintf(sTemp, "%s%03d.sti", "FACES\\BIGFACES\\", usProfileIdsForTerroristFiles[ iFileNumber + 1 ]);
}
sprintf( sTemp, "%s%02d.sti", "FACES\\BIGFACES\\", usProfileIdsForTerroristFiles[iFileNumber + 1] );
}
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;