Fix: Swap Merc Portaits caused problems when trying to swap position with a dead merc. This is now denied.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7640 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2014-11-02 15:16:57 +00:00
parent b09e46dd1b
commit 001f716d2f
+7
View File
@@ -6957,6 +6957,13 @@ void SwapMercPortraits ( SOLDIERTYPE *pSoldier, INT8 bDirection )
{
ubTargetMerc = gTeamPanel[ bNewPosition ].ubID;
// Hey, you're dead. I don't want to swap with you.
if ( MercPtrs[ubTargetMerc]->stats.bLife <= 0 )
{
RebuildCurrentSquad( );
return;
}
// store face indexes
iSourceFace = MercPtrs[ ubSourceMerc ]->iFaceIndex;
iTargetFace = MercPtrs[ ubTargetMerc ]->iFaceIndex;