From 75f70a13e3fc4be63aef2c6b6cc4b16c7a89643b Mon Sep 17 00:00:00 2001 From: Lesh Date: Sun, 3 Dec 2006 18:15:40 +0000 Subject: [PATCH] - added possibility to dismiss a vehicle without passengers git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@643 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/mapscreen.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index c21a4812..79809c6d 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -11604,7 +11604,7 @@ BOOLEAN CanExtendContractForCharSlot( INT8 bCharNumber ) Assert( pSoldier->bActive ); // if a vehicle, in transit, or a POW - if( ( pSoldier->uiStatusFlags & SOLDIER_VEHICLE ) || + if( /*( pSoldier->uiStatusFlags & SOLDIER_VEHICLE ) ||*/ ( pSoldier->bAssignment == IN_TRANSIT ) || ( pSoldier->bAssignment == ASSIGNMENT_POW ) ) { @@ -11612,6 +11612,14 @@ BOOLEAN CanExtendContractForCharSlot( INT8 bCharNumber ) return (FALSE); } + // if a vehicle has passengers + if ( (pSoldier->uiStatusFlags & SOLDIER_VEHICLE) && + (DoesVehicleHaveAnyPassengers(pSoldier->bVehicleID) ) ) + { + // then restrict contract menu + return (FALSE); + } + // mercs below OKLIFE, M.E.R.C. mercs, EPCs, and the Robot use the Contract menu so they can be DISMISSED/ABANDONED! // everything OK