From 7c40f2735986e2ab0b77b4201e32b8611ed6f649 Mon Sep 17 00:00:00 2001 From: Shadooow Date: Fri, 14 Jan 2022 22:58:32 +0000 Subject: [PATCH] Dismissing vehicle will drop items in its inventory in current sector without asking. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9257 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Assignments.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index f9da4dafc..f190a7cfb 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -12694,12 +12694,19 @@ void BeginRemoveMercFromContract( SOLDIERTYPE *pSoldier ) return; } #endif + //shadooow: it makes no sense, but if someone wants to dismiss vehicle then do not popup the department box and drop its items in current sector without asking + if (pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) + { + StrategicRemoveMerc(pSoldier); + HandleLeavingOfEquipmentInCurrentSector(pSoldier->ubID); + return; + } // WANNE: Nothing to do here, when we want to dismiss the robot BOOLEAN fAmIaRobot = AM_A_ROBOT( pSoldier ); // Flugente: If merc is unconscious, just fire him anyway (if talking stuff is called, this leads to a geme lock) - if (!fAmIaRobot && pSoldier->stats.bLife > CONSCIOUSNESS ) + if (!fAmIaRobot && pSoldier->stats.bLife > CONSCIOUSNESS ) { if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC ) || ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__NPC ) ) {