-added ENABLE_CREPITUS flag to options ini file to enable/disable crepitus even in sci-fi mode

-fixed BR's not stocking things later in game if they were illegal when game started

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@425 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2006-08-11 19:29:50 +00:00
parent c739efc56e
commit 367f4e88fd
11 changed files with 18 additions and 14 deletions
+1
View File
@@ -483,6 +483,7 @@ void LoadGameExternalOptions()
//Misc //Misc
gGameExternalOptions.fAmmoDynamicWeight = iniReader.ReadBoolean("JA2 Gameplay Settings", "DYNAMIC_AMMO_WEIGHT", TRUE); //Pulmu gGameExternalOptions.fAmmoDynamicWeight = iniReader.ReadBoolean("JA2 Gameplay Settings", "DYNAMIC_AMMO_WEIGHT", TRUE); //Pulmu
gGameExternalOptions.fEnableCrepitus = iniReader.ReadBoolean("JA2 Gameplay Settings", "ENABLE_CREPITUS", TRUE);
} }
+1
View File
@@ -305,6 +305,7 @@ typedef struct
BOOLEAN gfInsaneAggressiveQueen; BOOLEAN gfInsaneAggressiveQueen;
BOOLEAN fAmmoDynamicWeight; //Pulmu BOOLEAN fAmmoDynamicWeight; //Pulmu
BOOLEAN fEnableCrepitus;
} GAME_EXTERNAL_OPTIONS; } GAME_EXTERNAL_OPTIONS;
+2 -2
View File
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else #else
//RELEASE BUILD VERSION //RELEASE BUILD VERSION
INT16 zVersionLabel[256] = { L"Release v1.13.422" }; INT16 zVersionLabel[256] = { L"Release v1.13.426" };
#endif #endif
INT8 czVersionNumber[16] = { "Build 06.08.10" }; INT8 czVersionNumber[16] = { "Build 06.08.11" };
INT16 zTrackingNumber[16] = { L"Z" }; INT16 zTrackingNumber[16] = { L"Z" };
+2 -4
View File
@@ -574,7 +574,7 @@ BOOLEAN InitBobbyRayNewInventory()
break; break;
//if Bobby Ray sells this, it can be sold, and it's allowed into this game (some depend on e.g. gun-nut option) //if Bobby Ray sells this, it can be sold, and it's allowed into this game (some depend on e.g. gun-nut option)
// if( ( StoreInventory[ i ][ BOBBY_RAY_NEW ] != 0) && !( Item[ i ].fFlags & ITEM_NOT_BUYABLE ) && ItemIsLegal( i ) ) // if( ( StoreInventory[ i ][ BOBBY_RAY_NEW ] != 0) && !( Item[ i ].fFlags & ITEM_NOT_BUYABLE ) && ItemIsLegal( i ) )
if( ( StoreInventory[ i ][ BOBBY_RAY_NEW ] != 0) && !( Item[ i ].notbuyable ) && ItemIsLegal( i ) ) if( !( Item[ i ].notbuyable ) )
{ {
LaptopSaveInfo.BobbyRayInventory[ usBobbyrIndex ].usItemIndex = i; LaptopSaveInfo.BobbyRayInventory[ usBobbyrIndex ].usItemIndex = i;
usBobbyrIndex++; usBobbyrIndex++;
@@ -612,10 +612,8 @@ BOOLEAN InitBobbyRayUsedInventory()
break; break;
//if Bobby Ray sells this, it can be sold, and it's allowed into this game (some depend on e.g. gun-nut option) //if Bobby Ray sells this, it can be sold, and it's allowed into this game (some depend on e.g. gun-nut option)
// if( ( StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[ i ].fFlags & ITEM_NOT_BUYABLE ) && ItemIsLegal( i ) ) // if( ( StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[ i ].fFlags & ITEM_NOT_BUYABLE ) && ItemIsLegal( i ) )
if( ( StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[ i ].notbuyable ) && ItemIsLegal( i ) ) if( !( Item[ i ].notbuyable ) )
{ {
// if( (StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[i].fFlags & ITEM_NOT_BUYABLE ) && ItemIsLegal( i ))
if( (StoreInventory[ i ][ BOBBY_RAY_USED ] != 0) && !( Item[i].notbuyable ) && ItemIsLegal( i ))
// in case his store inventory list is wrong, make sure this category of item can be sold used // in case his store inventory list is wrong, make sure this category of item can be sold used
if ( CanDealerItemBeSoldUsed( i ) ) if ( CanDealerItemBeSoldUsed( i ) )
{ {
+2 -2
View File
@@ -939,7 +939,7 @@ void CreatureAttackTown( UINT8 ubSectorID, BOOLEAN fOverrideTest )
void ChooseCreatureQuestStartDay() void ChooseCreatureQuestStartDay()
{ {
// INT32 iRandom, iDay; // INT32 iRandom, iDay;
if( !(gGameOptions.ubGameStyle == STYLE_SCIFI) ) if( !(gGameOptions.ubGameStyle == STYLE_SCIFI) || !gGameExternalOptions.fEnableCrepitus)
return; //only available in science fiction mode. return; //only available in science fiction mode.
//Post the event. Once it becomes due, it will setup the queen monster's location, and //Post the event. Once it becomes due, it will setup the queen monster's location, and
//begin spreading and attacking towns from there. //begin spreading and attacking towns from there.
@@ -1385,7 +1385,7 @@ void CreatureNightPlanning()
void CheckConditionsForTriggeringCreatureQuest( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ ) void CheckConditionsForTriggeringCreatureQuest( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
{ {
UINT8 ubValidMines = 0; UINT8 ubValidMines = 0;
if( !(gGameOptions.ubGameStyle == STYLE_SCIFI) ) if( !(gGameOptions.ubGameStyle == STYLE_SCIFI) || !gGameExternalOptions.fEnableCrepitus)
return; //No scifi, no creatures... return; //No scifi, no creatures...
if( giLairID ) if( giLairID )
return; //Creature quest already begun return; //Creature quest already begun
+1 -1
View File
@@ -160,7 +160,7 @@ void InitNPCs( void )
gfPlayerTeamSawJoey = FALSE; gfPlayerTeamSawJoey = FALSE;
if ( gGameOptions.ubGameStyle == STYLE_SCIFI ) if ( gGameOptions.ubGameStyle == STYLE_SCIFI && gGameExternalOptions.fEnableCrepitus )
{ {
// add Bob // add Bob
pProfile = &(gMercProfiles[BOB]); pProfile = &(gMercProfiles[BOB]);
+1 -1
View File
@@ -1017,7 +1017,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
break; break;
case FACT_FATHER_DRUNK_AND_SCIFI_OPTION_ON: case FACT_FATHER_DRUNK_AND_SCIFI_OPTION_ON:
gubFact[usFact] = ( ( gMercProfiles[ FATHER ].bNPCData >= 5 ) && gGameOptions.ubGameStyle == STYLE_SCIFI ); gubFact[usFact] = ( ( gMercProfiles[ FATHER ].bNPCData >= 5 ) && gGameOptions.ubGameStyle == STYLE_SCIFI && gGameExternalOptions.fEnableCrepitus);
break; break;
case FACT_BLOODCAT_QUEST_STARTED_TWO_DAYS_AGO: case FACT_BLOODCAT_QUEST_STARTED_TWO_DAYS_AGO:
+1 -1
View File
@@ -1216,7 +1216,7 @@ void HandleRPCDescriptionOfSector( INT16 sSectorX, INT16 sSectorY, INT16 sSector
if ( sSectorX == ubSectorDescription[ cnt ][ 1 ] && sSectorY == ubSectorDescription[ cnt ][ 0 ] ) if ( sSectorX == ubSectorDescription[ cnt ][ 1 ] && sSectorY == ubSectorDescription[ cnt ][ 0 ] )
{ {
// If we're not scifi, skip some // If we're not scifi, skip some
if ( !(gGameOptions.ubGameStyle == STYLE_SCIFI) && cnt == 3 ) if ( !(gGameOptions.ubGameStyle == STYLE_SCIFI && gGameExternalOptions.fEnableCrepitus) && cnt == 3 )
{ {
continue; continue;
} }
+2 -2
View File
@@ -2594,7 +2594,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
break; break;
case NPC_ACTION_NO_SCI_FI_END_MEANWHILE: case NPC_ACTION_NO_SCI_FI_END_MEANWHILE:
if ( !( gGameOptions.ubGameStyle == STYLE_SCIFI ) ) if ( !( gGameOptions.ubGameStyle == STYLE_SCIFI && gGameExternalOptions.fEnableCrepitus) )
{ {
// End meanwhile.... // End meanwhile....
// End meanwhile.... // End meanwhile....
@@ -3892,7 +3892,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
break; break;
case NPC_ACTION_TRIGGER_MICKY_BY_SCI_FI: case NPC_ACTION_TRIGGER_MICKY_BY_SCI_FI:
if ( gGameOptions.ubGameStyle == STYLE_SCIFI ) if ( gGameOptions.ubGameStyle == STYLE_SCIFI && gGameExternalOptions.fEnableCrepitus)
{ {
TriggerNPCRecord( MICKY, 7 ); TriggerNPCRecord( MICKY, 7 );
} }
+1 -1
View File
@@ -1188,7 +1188,7 @@ BOOLEAN ItemIsLegal( UINT16 usItemIndex )
} }
} }
if ( gGameOptions.ubGameStyle == STYLE_REALISTIC && Item[usItemIndex].scifi ) if ( gGameOptions.ubGameStyle != STYLE_SCIFI && Item[usItemIndex].scifi )
{ {
return FALSE; return FALSE;
} }
+4
View File
@@ -946,6 +946,10 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
// Make team look for items // Make team look for items
AllSoldiersLookforItems( TRUE ); AllSoldiersLookforItems( TRUE );
//Madd: set warning value to signal other enemies
if( pSoldier->bTeam == ENEMY_TEAM )
Corpse.ubAIWarningValue = 20;
//if we are to call TacticalRemoveSoldier after adding the corpse //if we are to call TacticalRemoveSoldier after adding the corpse
if( fRemoveMerc ) if( fRemoveMerc )
{ {