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
+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
}