- Fixed problems with merc faces when doing certain actions. This bug was introduced in revision: 4396

o Fixes endless loop when clicking on items with explosives and merc starts to talk
o Fixes hidden merc faces
o Fixes wrong merc faces (merc face instead of skull) when merc is dead

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4456 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-05-29 16:08:27 +00:00
parent 993f3a204c
commit 2b7f79db94
5 changed files with 69 additions and 11 deletions
+7 -3
View File
@@ -5001,9 +5001,13 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
{
if(MercPtrs[cnt]->ubID == cnt)
{
SetCamoFace( MercPtrs[cnt] );
DeleteSoldierFace( MercPtrs[cnt] );// remove face
MercPtrs[cnt]->iFaceIndex = InitSoldierFace( MercPtrs[cnt] );// create new face
// WANNE: We should only delete the face, if there was a camo we applied.
// This should fix the bug and crashes with missing faces
if (SetCamoFace( MercPtrs[cnt] ))
{
DeleteSoldierFace( MercPtrs[cnt] );// remove face
MercPtrs[cnt]->iFaceIndex = InitSoldierFace( MercPtrs[cnt] );// create new face
}
}
}