mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
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:
@@ -6957,6 +6957,13 @@ void SwapMercPortraits ( SOLDIERTYPE *pSoldier, INT8 bDirection )
|
|||||||
{
|
{
|
||||||
ubTargetMerc = gTeamPanel[ bNewPosition ].ubID;
|
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
|
// store face indexes
|
||||||
iSourceFace = MercPtrs[ ubSourceMerc ]->iFaceIndex;
|
iSourceFace = MercPtrs[ ubSourceMerc ]->iFaceIndex;
|
||||||
iTargetFace = MercPtrs[ ubTargetMerc ]->iFaceIndex;
|
iTargetFace = MercPtrs[ ubTargetMerc ]->iFaceIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user