From 001f716d2f9945505e58608240ab4c0e2866e4ea Mon Sep 17 00:00:00 2001 From: silversurfer Date: Sun, 2 Nov 2014 15:16:57 +0000 Subject: [PATCH] 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 --- Tactical/Turn Based Input.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index 88c5682ff..c35bfa25a 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -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;