From 911e255bb0f97e876e1b3cc50e03c23c1db065e4 Mon Sep 17 00:00:00 2001 From: Wanne Date: Tue, 25 Jun 2013 06:29:02 +0000 Subject: [PATCH] - New Feature: Added possibility for CIV_TEAM (e.g: Kingpin, ...) to drop ALL their stuff (like you can do for enemies and militia) (by silversurfer) o On/Off feature in ja2_options.ini (CIVILIANS_DROP_ALL) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6154 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 7 +++++-- GameSettings.h | 2 ++ Tactical/Rotting Corpses.cpp | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index 87a592c4..7e96194f 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -958,7 +958,7 @@ void LoadGameExternalOptions() // silversurfer: don't play quote when mine spotted? gGameExternalOptions.fMineSpottedNoTalk = iniReader.ReadBoolean("Tactical Interface Settings","MINES_SPOTTED_NO_TALK", FALSE); - + // WANNE: Don't stop and talk in turn based when spotting an item gGameExternalOptions.fItemSpottedNoTalk = iniReader.ReadBoolean("Tactical Interface Settings","ITEMS_SPOTTED_NO_TALK", FALSE); @@ -1032,6 +1032,9 @@ void LoadGameExternalOptions() // HEADROCK HAM B2.8: At "1", Militia will drop their equipment similar to enemies, IF killed by non-player character. At "2" they drop whenever killed. gGameExternalOptions.ubMilitiaDropEquipment = iniReader.ReadInteger("Tactical Difficulty Settings","MILITIA_DROP_EQUIPMENT", 0, 0, 2 ); + + // silversurfer: enable dropping of all items for civilians? + gGameExternalOptions.fCiviliansDropAll = iniReader.ReadBoolean("Tactical Difficulty Settings","CIVILIANS_DROP_ALL", FALSE); // HEADROCK HAM B2.7: Change the speed of skill progression. (defaults set to JA2 normal) gGameExternalOptions.usHealthSubpointsToImprove = iniReader.ReadInteger("Tactical Difficulty Settings","HEALTH_SUBPOINTS_TO_IMPROVE", 50, 1, 1000 ); @@ -2637,7 +2640,7 @@ void LoadCTHConstants() gGameCTHConstants.AIM_WIS = iniReader.ReadFloat("Aiming CTH","AIM_WIS",1.0, 0.0, 100.0); gGameCTHConstants.AIM_DEX = iniReader.ReadFloat("Aiming CTH","AIM_DEX",2.0, 0.0, 100.0); - gGameCTHConstants.AIM_TOO_CLOSE_SCOPE = iniReader.ReadFloat("Aiming CTH","AIM_TOO_CLOSE_SCOPE",-4.0, -1000.0, 1000.0); + gGameCTHConstants.AIM_TOO_CLOSE_SCOPE = iniReader.ReadFloat("Aiming CTH","AIM_TOO_CLOSE_SCOPE",-4.0, -1000.0, 0.0); gGameCTHConstants.AIM_GUN_CONDITION = iniReader.ReadFloat("Aiming CTH","AIM_GUN_CONDITION",-2.0, -1000.0, 1000.0); gGameCTHConstants.AIM_LOW_MORALE = iniReader.ReadFloat("Aiming CTH","AIM_LOW_MORALE",-2.0, -1000.0, 1000.0); gGameCTHConstants.AIM_HIGH_MORALE = iniReader.ReadFloat("Aiming CTH","AIM_HIGH_MORALE",1.0, -1000.0, 1000.0); diff --git a/GameSettings.h b/GameSettings.h index 5094c778..e9518b03 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -1102,6 +1102,8 @@ typedef struct UINT8 ubEarlyRebelsRecruitment[4]; // early recruitment of Miguel and Carlos // silversurfer: don't play quote when merc spots a mine? TRUE = shut up! FALSE = tell me that you found a mine! BOOLEAN fMineSpottedNoTalk; + // enables item drops for civilians + BOOLEAN fCiviliansDropAll; // WANNE: Don't stop and talk when spotting a new item in turn based mode BOOLEAN fItemSpottedNoTalk; diff --git a/Tactical/Rotting Corpses.cpp b/Tactical/Rotting Corpses.cpp index 395ab47e..0ab50d4a 100644 --- a/Tactical/Rotting Corpses.cpp +++ b/Tactical/Rotting Corpses.cpp @@ -46,6 +46,7 @@ #include "Music Control.h" #include "Campaign Types.h" #include "text.h" // added by Flugente + #include "Vehicles.h" // added by silversurfer #endif #include "Animation Control.h" @@ -994,7 +995,9 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE if ( pObj->exists() == true ) { // Check if it's supposed to be dropped - if ( !( (*pObj).fFlags & OBJECT_UNDROPPABLE ) || pSoldier->bTeam == gbPlayerNum ) + // silversurfer: new option to drop items from CIV_TEAM regardless of "OBJECT_UNDROPPABLE" flag + if ( !( (*pObj).fFlags & OBJECT_UNDROPPABLE ) || pSoldier->bTeam == gbPlayerNum + || ( gGameExternalOptions.fCiviliansDropAll && pSoldier->bTeam == CIV_TEAM && !IsVehicle(pSoldier) )) { // and make sure that it really is a droppable item type // if ( !(Item[ pObj->usItem ].fFlags & ITEM_DEFAULT_UNDROPPABLE) )