mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- If NPC_AUTORESOLVE_DROP_ALL is TRUE (default FALSE), NPCs (enemies, militia, bandits, creatures...) drop items in autresolve like they would in tactical combat.
- Fix: dropped items are clones when dropping from autoresolve git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8594 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+5
-2
@@ -1196,7 +1196,10 @@ void LoadGameExternalOptions()
|
||||
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);
|
||||
gGameExternalOptions.fCiviliansDropAll = iniReader.ReadBoolean("Tactical Difficulty Settings","CIVILIANS_DROP_ALL", FALSE);
|
||||
|
||||
// Flugente: can NPCs drop items in autoresolve?
|
||||
gGameExternalOptions.fNPCAutoresolveItemDrop = iniReader.ReadBoolean("Tactical Difficulty Settings", "NPC_AUTORESOLVE_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 );
|
||||
@@ -1866,7 +1869,7 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.sMinEnterMilitiaReinforcements = iniReader.ReadInteger("Strategic Gameplay Settings", "MIN_ENTER_MILITIA_REINFORCEMENTS", 6, 1, 64);
|
||||
gGameExternalOptions.sRndEnterMilitiaReinforcements = iniReader.ReadInteger("Strategic Gameplay Settings", "RND_ENTER_MILITIA_REINFORCEMENTS", 4, 1, 64);
|
||||
//dnl ch68 090913 Don't allow permanent items removal from sector
|
||||
gGameExternalOptions.fNoRemoveRandomSectorItems = iniReader.ReadBoolean("Strategic GamePlay Settings", "NO_REMOVE_RANDOM_SECTOR_ITEMS", true, false);
|
||||
gGameExternalOptions.fNoRemoveRandomSectorItems = iniReader.ReadBoolean("Strategic GamePlay Settings", "NO_REMOVE_RANDOM_SECTOR_ITEMS", TRUE );
|
||||
|
||||
gGameExternalOptions.fArmyUsesTanksInAttacks = iniReader.ReadBoolean("Strategic Gameplay Settings","ARMY_USES_TANKS_IN_ATTACKS", FALSE);
|
||||
gGameExternalOptions.fArmyUsesTanksInPatrols = iniReader.ReadBoolean("Strategic Gameplay Settings","ARMY_USES_TANKS_IN_PATROLS", FALSE);
|
||||
|
||||
@@ -1235,6 +1235,9 @@ typedef struct
|
||||
// enables item drops for civilians
|
||||
BOOLEAN fCiviliansDropAll;
|
||||
|
||||
// Flugente: can NPCs drop items in autoresolve?
|
||||
BOOLEAN fNPCAutoresolveItemDrop;
|
||||
|
||||
// WANNE: Don't stop and talk when spotting a new item in turn based mode
|
||||
BOOLEAN fItemSpottedNoTalk;
|
||||
|
||||
|
||||
+2
-2
@@ -55,8 +55,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 18.08.12" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 18.08.15" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
CHAR16 zRevisionNumber[16] = { L"Revision 8591" };
|
||||
CHAR16 zRevisionNumber[16] = { L"Revision 8594" };
|
||||
|
||||
// SAVE_GAME_VERSION is defined in header, change it there
|
||||
|
||||
@@ -2434,8 +2434,9 @@ else
|
||||
|
||||
// only enemy soldiers use auto-drop system!
|
||||
// don't use the auto-drop system in auto-resolve: player won't see what's being used & enemies will often win & keep'em
|
||||
// Flugente: nah. We can decide to not drop later on if we want anyway.
|
||||
// HEADROCK HAM B2.8: Militia now drop all their equipment... IF not killed by player (see TurnSoldierIntoCorpse() )
|
||||
if ( (SOLDIER_CLASS_ENEMY( bSoldierClass ) || ( gGameExternalOptions.ubMilitiaDropEquipment > 0 && SOLDIER_CLASS_MILITIA( bSoldierClass ) )) && !IsAutoResolveActive() )
|
||||
if ( SOLDIER_CLASS_ENEMY( bSoldierClass ) || ( gGameExternalOptions.ubMilitiaDropEquipment > 0 && SOLDIER_CLASS_MILITIA( bSoldierClass ) ) )
|
||||
{
|
||||
// SPECIAL handling for weapons: we'll always drop a weapon type that has never been dropped before
|
||||
UINT32 invsize = pp->Inv.size();
|
||||
|
||||
+13
-18
@@ -1970,7 +1970,7 @@ BOOLEAN AddWorldItemsToUnLoadedSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ, INT
|
||||
if( fOverWrite )
|
||||
{
|
||||
//first loop through and mark all entries that they dont exists
|
||||
for( UINT32 cnt=0; cnt<uiNumberOfItems; cnt++)
|
||||
for( UINT32 cnt=0; cnt<uiNumberOfItems; ++cnt)
|
||||
pWorldItems[ cnt ].fExists = FALSE;
|
||||
|
||||
//Now delete the item temp file
|
||||
@@ -1980,10 +1980,14 @@ BOOLEAN AddWorldItemsToUnLoadedSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ, INT
|
||||
uiLastItemPos = 0;
|
||||
|
||||
//loop through all the objects to add
|
||||
for( uiLoop=0; uiLoop < uiNumberOfItemsToAdd; uiLoop++)
|
||||
for( uiLoop=0; uiLoop < uiNumberOfItemsToAdd; ++uiLoop)
|
||||
{
|
||||
// Flugente: only add an item if it exists. Otherwise we will happily add items that are supposed to have been deleted
|
||||
if ( !pWorldItem[uiLoop].fExists )
|
||||
continue;
|
||||
|
||||
//Loop through the array to see if there is a free spot to add an item to it
|
||||
for( ; uiLastItemPos < uiNumberOfItems; uiLastItemPos++)
|
||||
for( ; uiLastItemPos < uiNumberOfItems; ++uiLastItemPos)
|
||||
{
|
||||
if( pWorldItems[ uiLastItemPos ].fExists == FALSE )
|
||||
{
|
||||
@@ -2022,8 +2026,7 @@ BOOLEAN AddWorldItemsToUnLoadedSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ, INT
|
||||
pWorldItems[ uiLastItemPos ].usFlags = pWorldItem[ uiLoop ].usFlags;
|
||||
pWorldItems[ uiLastItemPos ].bVisible = pWorldItem[ uiLoop ].bVisible;
|
||||
pWorldItems[ uiLastItemPos ].bRenderZHeightAboveLevel = pWorldItem[ uiLoop ].bRenderZHeightAboveLevel;
|
||||
|
||||
|
||||
|
||||
//Check
|
||||
if(TileIsOutOfBounds(pWorldItem[ uiLoop ].sGridNo) && !( pWorldItems[ uiLastItemPos ].usFlags & WORLD_ITEM_GRIDNO_NOT_SET_USE_ENTRY_POINT ) )
|
||||
{
|
||||
@@ -2819,8 +2822,6 @@ BOOLEAN GetSectorFlagStatus( INT16 sMapX, INT16 sMapY, UINT8 bMapZ, UINT32 uiFla
|
||||
return( (GetUnderGroundSectorFlagStatus( sMapX, sMapY, bMapZ, uiFlagToSet ) ) ? 1 : 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN AddDeadSoldierToUnLoadedSector( INT16 sMapX, INT16 sMapY, UINT8 bMapZ, SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT32 uiFlags )
|
||||
{
|
||||
UINT32 uiNumberOfItems;
|
||||
@@ -2850,9 +2851,7 @@ BOOLEAN AddDeadSoldierToUnLoadedSector( INT16 sMapX, INT16 sMapY, UINT8 bMapZ, S
|
||||
}
|
||||
else
|
||||
AssertMsg( 0, "ERROR!! Flag not is Switch statement");
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
//Create an array of objects from the mercs inventory
|
||||
//
|
||||
@@ -2864,15 +2863,11 @@ BOOLEAN AddDeadSoldierToUnLoadedSector( INT16 sMapX, INT16 sMapY, UINT8 bMapZ, S
|
||||
{
|
||||
if( pSoldier->inv[ i ].exists() == true )
|
||||
{
|
||||
// if not a player soldier
|
||||
if ( pSoldier->bTeam != gbPlayerNum )
|
||||
// Flugente: if we don't want items to drop in autoresolve, this is the place to set that
|
||||
if ( pSoldier->bTeam != gbPlayerNum && !gGameExternalOptions.fNPCAutoresolveItemDrop )
|
||||
{
|
||||
// this percent of the time, they don't drop stuff they would've dropped in tactical...
|
||||
if ( Random( 100 ) < 75 )
|
||||
{
|
||||
// mark it undroppable...
|
||||
pSoldier->inv[ i ].fFlags |= OBJECT_UNDROPPABLE;
|
||||
}
|
||||
// mark it undroppable...
|
||||
pSoldier->inv[i].fFlags |= OBJECT_UNDROPPABLE;
|
||||
}
|
||||
|
||||
//if the item can be dropped
|
||||
|
||||
Reference in New Issue
Block a user