Little Alien

- Externalized settings for Madlab quest, Mike and Iggy
- Externalized visibility decrease for rain

Madd Mugsy

- Bug fix - "Auto" mode was turning off on Full Auto only weapons when you equipped a second gun
- Fixed - 10 Tons of Guns code now affects EnemyGunChoices and EnemyItemChoices 
- Enemy reinforcements restricted from appearing in Omerta




git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@75 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2006-05-21 00:07:05 +00:00
parent cc7bae40a3
commit 30710d5228
10 changed files with 68 additions and 22 deletions
+6
View File
@@ -360,6 +360,7 @@ void LoadGameExternalOptions()
//Sight range
gGameExternalOptions.ubStraightSightRange = iniReader.ReadInteger("JA2 Tactical Settings","BaseSightRange",13);
gGameExternalOptions.ubVisDistDecreasePerRainIntensity = iniReader.ReadInteger("JA2 Tactical Settings","VISUAL_DISTANCE_DECREASE_PER_RAIN_INTENSITY",20);
// Maximal search distance for grenades
//gGameExternalOptions.guiMaxTossSearchDist = iniReader.ReadInteger("JA2 Tactical Settings","MaxTossSearchDist",3);
@@ -379,6 +380,11 @@ void LoadGameExternalOptions()
gGameExternalOptions.guiMaxDLInterval = iniReader.ReadInteger("JA2 Thunder Settings","MAX_INTERVAL_BETWEEN_LIGHTNING_AND_THUNDERCLAPS_IN_SECONDS",5);
gGameExternalOptions.guiProlongLightningIfSeenSomeone = iniReader.ReadInteger("JA2 Thunder Settings","PROLOGNE_DELAY_IF_SEEN_SOMEONE_DURING_LIGHTNING_IN_TURNBASED_IN_SECONDS",5);
gGameExternalOptions.guiChanceToDoLightningBetweenTurns = iniReader.ReadInteger("JA2 Thunder Settings","CHANCE_TO_DO_LIGHTNING_BETWEEN_TURNS",35);
//Gameplay settings
gGameExternalOptions.ubGameProgressStartMadlabQuest = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_START_MADLAB_QUEST",35);
gGameExternalOptions.ubGameProgressMikeAvailable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_MIKE_AVALIABLE",50);
gGameExternalOptions.ubGameProgressIggyAvaliable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_IGGY_AVALIABLE",70);
}
+14 -5
View File
@@ -180,14 +180,14 @@ typedef struct
// Moved from NewGameSettings.cpp
//Video settings
UINT8 gubDeadLockDelay;
UINT8 ubStraightSightRange;
// System settings
BOOLEAN gfVSync;
UINT8 gubDeadLockDelay;
BOOLEAN gfEnableEmergencyButton_SkipStrategicEvents;
//Video settings
BOOLEAN gfVSync;
//Animation settings
UINT8 gubPlayerTurnSpeedUpFactor;
UINT8 gubEnemyTurnSpeedUpFactor;
@@ -205,6 +205,10 @@ typedef struct
BOOLEAN gfAllowReinforcments;
BOOLEAN gfAllowReinforcmentsOnlyInCity;
UINT32 guiBaseQueenPoolIncrement;
//Sight range
UINT8 ubStraightSightRange;
UINT32 ubVisDistDecreasePerRainIntensity;
// Rain settings
BOOLEAN gfAllowRain;
@@ -221,6 +225,11 @@ typedef struct
UINT32 guiProlongLightningIfSeenSomeone;
UINT32 guiChanceToDoLightningBetweenTurns;
//Gameplay settings
UINT8 ubGameProgressStartMadlabQuest;
UINT8 ubGameProgressMikeAvailable;
UINT8 ubGameProgressIggyAvaliable;
} GAME_EXTERNAL_OPTIONS;
//This structure will contain general Ja2 settings NOT individual game settings.
+1 -1
View File
@@ -28,7 +28,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#endif
INT8 czVersionNumber[16] = { "Build 06.05.18" };
INT8 czVersionNumber[16] = { "Build 06.05.20" };
INT16 zTrackingNumber[16] = { L"Z" };
+2 -2
View File
@@ -43,7 +43,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib"
OutputFile="C:\games\Jagged Alliance 2 v1.13\ja2_debug_2006_05_18.exe"
OutputFile="C:\games\Jagged Alliance 2 v1.13\ja2_debug_2006_05_20.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
@@ -546,7 +546,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib"
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_release_2006_05_18.exe"
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_release_2006_05_20.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
+3
View File
@@ -632,6 +632,9 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass)
for(i=gusCurWeaponIndex; ((i<=gusLastItemIndex) && (ubCount < 4)); i++)
{
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("DisplayItemInfo: current weapon: %d",gusCurWeaponIndex));
if( uiItemClass == BOBBYR_USED_ITEMS )
{
//If there is not items in stock
+6
View File
@@ -46,6 +46,9 @@ void GetNumberOfEnemiesInFiveSectors( INT16 sSectorX, INT16 sSectorY, UINT8 *pub
if( !gGameExternalOptions.gfAllowReinforcments )
return;
if ( GetTownIdForSector( sSectorX, sSectorY ) == OMERTA ) //Madd: skip Omerta
return;
GenerateDirectionInfos( sSectorX, sSectorY, &ubDirNumber, pusMoveDir,
( GetTownIdForSector( sSectorX, sSectorY ) != BLANK_SECTOR ? TRUE : FALSE ), TRUE, IS_ONLY_IN_CITIES );
@@ -247,6 +250,9 @@ UINT8 DoReinforcementAsPendingEnemy( INT16 sMapX, INT16 sMapY )
if( !gGameExternalOptions.gfAllowReinforcments )
return 255;
if ( GetTownIdForSector( sMapX, sMapY ) == OMERTA ) //Madd: skip Omerta
return 255;
pThisSector = &SectorInfo[ SECTOR( sMapX, sMapY ) ];
GenerateDirectionInfos( sMapX, sMapY, &ubDirNumber, pusMoveDir,
+3 -3
View File
@@ -1342,19 +1342,19 @@ void HourlyProgressUpdate(void)
// CJC: note when progress goes above certain values for the first time
// at 35% start the Madlab quest
if ( ubCurrentProgress >= 35 && gStrategicStatus.ubHighestProgress < 35 )
if ( ubCurrentProgress >= gGameExternalOptions.ubGameProgressStartMadlabQuest && gStrategicStatus.ubHighestProgress < gGameExternalOptions.ubGameProgressStartMadlabQuest )
{
HandleScientistAWOLMeanwhileScene();
}
// at 50% make Mike available to the strategic AI
if ( ubCurrentProgress >= 50 && gStrategicStatus.ubHighestProgress < 50 )
if ( ubCurrentProgress >= gGameExternalOptions.ubGameProgressMikeAvailable && gStrategicStatus.ubHighestProgress < gGameExternalOptions.ubGameProgressMikeAvailable )
{
SetFactTrue( FACT_MIKE_AVAILABLE_TO_ARMY );
}
// at 70% add Iggy to the world
if ( ubCurrentProgress >= 70 && gStrategicStatus.ubHighestProgress < 70 )
if ( ubCurrentProgress >= gGameExternalOptions.ubGameProgressIggyAvaliable && gStrategicStatus.ubHighestProgress < gGameExternalOptions.ubGameProgressIggyAvaliable )
{
gMercProfiles[ IGGY ].sSectorX = 5;
gMercProfiles[ IGGY ].sSectorY = MAP_ROW_C;
+30 -8
View File
@@ -2533,8 +2533,8 @@ void ReplaceExtendedGuns( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass )
UINT16 SelectStandardArmyGun( UINT8 uiGunLevel )
{
ARMY_GUN_CHOICE_TYPE *pGunChoiceTable;
UINT32 uiChoice;
UINT16 usGunIndex;
int uiChoice;
int usGunIndex;
// pick the standard army gun for this weapon class from table
// usGunIndex = gStrategicStatus.ubStandardArmyGunIndex[uiGunLevel];
@@ -2554,10 +2554,28 @@ UINT16 SelectStandardArmyGun( UINT8 uiGunLevel )
//}
// choose one the of the possible gun choices
uiChoice = Random(pGunChoiceTable[ uiGunLevel ].ubChoices);
usGunIndex = pGunChoiceTable[ uiGunLevel ].bItemNo[ uiChoice ];
usGunIndex = -1;
Assert(usGunIndex);
while (usGunIndex == -1)
{
uiChoice = Random(pGunChoiceTable[ uiGunLevel ].ubChoices);
usGunIndex = pGunChoiceTable[ uiGunLevel ].bItemNo[ uiChoice ];
if (!ItemIsLegal(usGunIndex)) //Madd: check for 10 tons of guns
usGunIndex = -1;
if (usGunIndex == -1)
{
//Madd: there better be something from the original JA2 guns here somewhere (biggunlist=0) or else this will probably cause an endless loop
if ( uiGunLevel < ARMY_GUN_LEVELS )
uiGunLevel++;
else
uiGunLevel--;
}
}
//Assert(usGunIndex);
return(usGunIndex);
}
@@ -2638,7 +2656,7 @@ UINT16 PickARandomItem(UINT8 typeIndex, UINT8 maxCoolness, BOOLEAN getMatchingCo
}
usItem = gArmyItemChoices[ typeIndex ].bItemNo[ uiChoice ];
if ( usItem >= 0 && Item[usItem].ubCoolness <= maxCoolness )
if ( usItem >= 0 && Item[usItem].ubCoolness <= maxCoolness && ItemIsLegal(usItem) )
{
// pick a default item in case we don't find anything with a matching coolness, but pick the coolest item we can find
if ( defaultItem == 0 || Item[usItem].ubCoolness > Item[defaultItem].ubCoolness )
@@ -2685,12 +2703,16 @@ UINT16 PickARandomAttachment(UINT8 typeIndex, UINT16 usBaseItem, UINT8 maxCoolne
if ( Item[usItem].ubCoolness == maxCoolness || !getMatchingCoolness )
{
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("PickARandomAttachment: baseItem = %d, usItem = %d",usBaseItem, usItem));
return usItem;
if (ItemIsLegal(usItem))
return usItem;
}
}
}
// couldn't find anything with the exact matching coolness, so return the best item we did find
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("PickARandomAttachment: baseItem = %d, defaultItem = %d",usBaseItem, defaultItem));
return defaultItem;
if (ItemIsLegal(usItem))
return defaultItem;
else
return 0;
}
+1 -1
View File
@@ -9352,7 +9352,7 @@ void ReLoadSoldierAnimationDueToHandItemChange( SOLDIERTYPE *pSoldier, UINT16 us
// Shutoff burst....
// ( we could be on, then change gun that does not have burst )
if ( Weapon[ usNewItem ].ubShotsPerBurst == 0 && !Weapon[usNewItem].NoSemiAuto )
if ( Weapon[ usNewItem ].ubShotsPerBurst == 0 && !Weapon[pSoldier->inv[HANDPOS].usItem ].NoSemiAuto )
{
pSoldier->bDoBurst = FALSE;
pSoldier->bWeaponMode = WM_NORMAL;
+2 -2
View File
@@ -45,7 +45,7 @@
#endif
//rain
#define VIS_DIST_DECREASE_PER_RAIN_INTENSITY 20
//#define VIS_DIST_DECREASE_PER_RAIN_INTENSITY 20
//end rain
#define WE_SEE_WHAT_MILITIA_SEES_AND_VICE_VERSA
@@ -312,7 +312,7 @@ INT16 AdjustMaxSightRangeForEnvEffects( SOLDIERTYPE *pSoldier, INT8 bLightLevel,
{
//sNewDist = sNewDist * 70 / 100;
//rain
sNewDist = sNewDist * ( 100 - VIS_DIST_DECREASE_PER_RAIN_INTENSITY * gbCurrentRainIntensity ) / 100;
sNewDist = sNewDist * ( 100 - gGameExternalOptions.ubVisDistDecreasePerRainIntensity * gbCurrentRainIntensity ) / 100;
//end rain
}