mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
The following options have been moved from the campaign the campaign start screen to JA2_Options.ini:
- Maximum number of IMPs (now MAX_IMP_CHARACTERS (Default: 10)) - Enemies drop all items (now DROP_ALL (Default: FALSE)) - Merc Story Backgrounds (now BACKGROUNDS (Default: TRUE)) - Food System (now FOOD (Default: FALSE)) - Improved Interrupt System (now IMPROVED_INTERRUPT_SYSTEM (Default: TRUE)) - Inventory Manipulation Costs AP (now INVENTORY_MANIPULATION_COSTS_AP (Default: FALSE)) For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23855&goto=354656&#msg_354656 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8610 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -2169,7 +2169,7 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
|
||||
}
|
||||
|
||||
// Flugente: food system - symbols used if hungry or thirsty
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
if ( MercPtrs[ pFace->ubSoldierID ]->bDrinkLevel < FoodMoraleMods[FOOD_MERC_START_SHOW_HUNGER_SYMBOL].bThreshold )
|
||||
{
|
||||
|
||||
+3
-3
@@ -102,7 +102,7 @@ void AddFoodpoints( INT32& arCurrentFood, INT32 aVal )
|
||||
|
||||
BOOLEAN DoesSoldierRefuseToEat( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj )
|
||||
{
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
// static variables to remember the last food someone was forced to eat
|
||||
static UINT8 lasteater = 0;
|
||||
@@ -854,7 +854,7 @@ void SectorFillCanteens( void )
|
||||
|
||||
// it would be pretty pointless to fill our canteens and then not to drink from them even though we are hungry. If there is an unlimited water source in this sector, drink from our
|
||||
// freshly filled canteens. Thus calling this function repeatedly will cause us to drink till we're full, and restore our canteens to full level
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
EatFromInventory( pSoldier, TRUE );
|
||||
}
|
||||
}
|
||||
@@ -1129,7 +1129,7 @@ void DrinkFromWaterTap( SOLDIERTYPE* pSoldier )
|
||||
if ( pSoldier->ubProfile == ROBOT || IsVehicle( pSoldier ) )
|
||||
return;
|
||||
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
INT32 watertoadd = max( 0, FoodMoraleMods[FOOD_NORMAL].bThreshold - pSoldier->bDrinkLevel );
|
||||
|
||||
|
||||
@@ -4069,9 +4069,10 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
||||
}
|
||||
}
|
||||
|
||||
if ( gGameOptions.fFoodSystem && Item[gpItemDescObject->usItem].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[gpItemDescObject->usItem].foodtype > 0 )
|
||||
{
|
||||
if (!fDrawGenIndexes) fDrawGenIndexes = ++cnt; // new index line here?
|
||||
if (!fDrawGenIndexes)
|
||||
fDrawGenIndexes = ++cnt; // new index line here?
|
||||
|
||||
////////////////////// POISONED FOOD
|
||||
if ( (*gpItemDescObject)[0]->data.bTemperature != 0 )
|
||||
@@ -5739,7 +5740,7 @@ void DrawAdvancedStats( OBJECTTYPE * gpItemDescObject )
|
||||
}
|
||||
}
|
||||
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
if ( ( Item[gpItemDescObject->usItem].foodtype > 0 ) ||
|
||||
( fComparisonMode && Item[gpComparedItemDescObject->usItem].foodtype > 0 ) )
|
||||
@@ -14027,8 +14028,9 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////// FOOD
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
{
|
||||
UINT32 fFoodtype = Item[gpItemDescObject->usItem].foodtype;
|
||||
UINT32 fComparedFoodtype = 0;
|
||||
|
||||
@@ -4015,7 +4015,7 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
if ( OVERHEATING_MAX_TEMPERATURE > 0 )
|
||||
{
|
||||
// Flugente: display condition of food if it can decay
|
||||
if ( gGameOptions.fFoodSystem && Item[pObject->usItem].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[pObject->usItem].foodtype > 0 )
|
||||
{
|
||||
FLOAT condition = (*pObject)[0]->data.bTemperature / OVERHEATING_MAX_TEMPERATURE;
|
||||
|
||||
@@ -7318,7 +7318,7 @@ void RenderItemDescriptionBox( )
|
||||
mprintf( usX, usY, pStr );
|
||||
}
|
||||
// Flugente: display condition of food if it can decay
|
||||
else if ( gGameOptions.fFoodSystem == TRUE && Item[gpItemDescObject->usItem].foodtype > 0 )
|
||||
else if ( UsingFoodSystem() && Item[gpItemDescObject->usItem].foodtype > 0 )
|
||||
{
|
||||
if ( OVERHEATING_MAX_TEMPERATURE > 0 )
|
||||
{
|
||||
|
||||
@@ -2781,7 +2781,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
||||
FindFontRightCoordinates(SM_DEX_X, SM_DEX_Y ,SM_STATS_WIDTH ,SM_STATS_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY , sString );
|
||||
|
||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeStrengthTime, (BOOLEAN)(gpSMCurrentMerc->usValueGoneUp & STRENGTH_INCREASE ? TRUE : FALSE), (BOOLEAN)(((gGameOptions.fNewTraitSystem && (gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] > 0)) || (gGameOptions.fFoodSystem && gpSMCurrentMerc->usStarveDamageStrength > 0)) ? TRUE : FALSE), gpSMCurrentMerc->bExtraStrength != 0 ); // SANDRO
|
||||
UpdateStatColor( gpSMCurrentMerc->timeChanges.uiChangeStrengthTime, (BOOLEAN)(gpSMCurrentMerc->usValueGoneUp & STRENGTH_INCREASE ? TRUE : FALSE), (BOOLEAN)(((gGameOptions.fNewTraitSystem && (gpSMCurrentMerc->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] > 0)) || ( UsingFoodSystem() && gpSMCurrentMerc->usStarveDamageStrength > 0)) ? TRUE : FALSE), gpSMCurrentMerc->bExtraStrength != 0 ); // SANDRO
|
||||
|
||||
swprintf( sString, L"%2d", gpSMCurrentMerc->stats.bStrength + gpSMCurrentMerc->bExtraStrength );
|
||||
FindFontRightCoordinates(SM_STR_X, SM_STR_Y ,SM_STATS_WIDTH ,SM_STATS_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
@@ -2980,14 +2980,12 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
||||
{
|
||||
GetMoraleString( gpSMCurrentMerc, pMoraleStr );
|
||||
// Flugente: food info if food system is active
|
||||
if ( gGameOptions.fFoodSystem && gpSMCurrentMerc->ubProfile != ROBOT && !IsVehicle(gpSMCurrentMerc) )
|
||||
if ( UsingFoodSystem() && gpSMCurrentMerc->ubProfile != ROBOT && !IsVehicle(gpSMCurrentMerc) )
|
||||
{
|
||||
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_FOOD_POPUPTEXT ], gpSMCurrentMerc->stats.bLife, gpSMCurrentMerc->stats.bLifeMax, gpSMCurrentMerc->bBreath, gpSMCurrentMerc->bBreathMax, pMoraleStr, (INT32)(100*(gpSMCurrentMerc->bDrinkLevel - FOOD_MIN) / FOOD_HALF_RANGE), L"%", (INT32)(100*(gpSMCurrentMerc->bFoodLevel - FOOD_MIN) / FOOD_HALF_RANGE), L"%" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_POPUPTEXT ], gpSMCurrentMerc->stats.bLife, gpSMCurrentMerc->stats.bLifeMax, gpSMCurrentMerc->bBreath, gpSMCurrentMerc->bBreathMax, pMoraleStr );
|
||||
}
|
||||
|
||||
@@ -3609,7 +3607,7 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
BOOLEAN fNewItem = FALSE;
|
||||
static BOOLEAN fRightDown = FALSE;
|
||||
static BOOLEAN fLeftDown = FALSE;
|
||||
BOOLEAN INV_AP_COST = gGameOptions.fInventoryCostsAP;
|
||||
BOOLEAN INV_AP_COST = UsingInventoryCostsAPSystem();
|
||||
|
||||
uiHandPos = MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
@@ -5514,7 +5512,7 @@ void RenderTEAMPanel( BOOLEAN fDirty )
|
||||
{
|
||||
GetMoraleString( pSoldier, pMoraleStr );
|
||||
|
||||
if ( gGameOptions.fFoodSystem && pSoldier->ubProfile != ROBOT && !IsVehicle(pSoldier) )
|
||||
if ( UsingFoodSystem() && pSoldier->ubProfile != ROBOT && !IsVehicle(pSoldier) )
|
||||
{
|
||||
swprintf( pStr, TacticalStr[ MERC_VITAL_STATS_WITH_FOOD_POPUPTEXT ], pSoldier->stats.bLife, pSoldier->stats.bLifeMax, pSoldier->bBreath, pSoldier->bBreathMax, pMoraleStr, (INT32)(100*(pSoldier->bDrinkLevel - FOOD_MIN) / FOOD_HALF_RANGE), L"%", (INT32)(100*(pSoldier->bFoodLevel - FOOD_MIN) / FOOD_HALF_RANGE), L"%" );
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ void DrawItemUIBarEx( OBJECTTYPE *pObject, UINT8 ubStatus, INT16 sXPos, INT16 sY
|
||||
if ( ubStatus == DRAW_ITEM_TEMPERATURE )
|
||||
{
|
||||
// the food item bar always has full size
|
||||
if ( gGameOptions.fFoodSystem == TRUE && Item[pObject->usItem].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[pObject->usItem].foodtype > 0 )
|
||||
{
|
||||
sValue = 100;
|
||||
}
|
||||
|
||||
@@ -6610,7 +6610,7 @@ void NCTHShowMounted( SOLDIERTYPE* pSoldier, UINT16* ptrBuf, UINT32 uiPitch, INT
|
||||
// Flugente: check a profile for a background flag without using SOLDIERTYPE
|
||||
BOOLEAN HasBackgroundFlag( UINT8 usProfile, UINT64 aFlag )
|
||||
{
|
||||
if ( gGameOptions.fBackGround && usProfile != NO_PROFILE )
|
||||
if ( UsingBackGroundSystem() && usProfile != NO_PROFILE )
|
||||
{
|
||||
if ( zBackground[gMercProfiles[usProfile].usBackground].uiFlags & aFlag )
|
||||
return TRUE;
|
||||
@@ -6621,7 +6621,7 @@ BOOLEAN HasBackgroundFlag( UINT8 usProfile, UINT64 aFlag )
|
||||
|
||||
INT16 GetBackgroundValue( UINT8 usProfile, UINT16 aNr )
|
||||
{
|
||||
if ( gGameOptions.fBackGround && usProfile != NO_PROFILE )
|
||||
if ( UsingBackGroundSystem() && usProfile != NO_PROFILE )
|
||||
{
|
||||
return zBackground[gMercProfiles[usProfile].usBackground].value[aNr];
|
||||
}
|
||||
|
||||
@@ -2327,7 +2327,7 @@ void RandomlyChooseWhichItemsAreDroppable( SOLDIERCREATE_STRUCT *pp, INT8 bSoldi
|
||||
|
||||
//Madd
|
||||
//if ( gGameSettings.fOptions[TOPTION_DROP_ALL] ) // EXTERNILIZED TO THE INI INSTEAD - SANDRO
|
||||
if ( gGameOptions.fEnemiesDropAllItems )
|
||||
if ( UsingEnemiesDropAllItemsSystem() )
|
||||
{
|
||||
ENEMYAMMODROPRATE = 100;
|
||||
ENEMYGRENADEDROPRATE = 100;
|
||||
@@ -2446,7 +2446,7 @@ else
|
||||
//TODO: someday maybe pp->Inv[i].fFlags &= ~ITEM_REPAIRABLE;
|
||||
|
||||
//if ( gGameSettings.fOptions[TOPTION_DROP_ALL] ) // EXTERNILIZED TO THE INI INSTEAD - SANDRO
|
||||
if ( gGameOptions.fEnemiesDropAllItems )
|
||||
if ( UsingEnemiesDropAllItemsSystem() )
|
||||
{
|
||||
// WANNE: "Drop all" should mean "Drop all"
|
||||
/*
|
||||
@@ -2488,11 +2488,9 @@ else
|
||||
}
|
||||
|
||||
//if ( gGameSettings.fOptions[TOPTION_DROP_ALL] ) // EXTERNILIZED TO THE INI INSTEAD - SANDRO
|
||||
if ( gGameOptions.fEnemiesDropAllItems )
|
||||
if ( UsingEnemiesDropAllItemsSystem() )
|
||||
return;
|
||||
|
||||
|
||||
|
||||
// WANNE: Randomly choose which type of items should be dropped
|
||||
if (gGameExternalOptions.ubEnemiesItemDrop == 0)
|
||||
{
|
||||
|
||||
+3
-3
@@ -1275,7 +1275,7 @@ BOOLEAN ItemIsLegal( UINT16 usItemIndex, BOOLEAN fIgnoreCoolness )
|
||||
return FALSE;
|
||||
|
||||
// silversurfer: no food items if the food system is off
|
||||
if ( !gGameOptions.fFoodSystem && Item[ usItemIndex ].foodtype > 0 )
|
||||
if ( !UsingFoodSystem() && Item[ usItemIndex ].foodtype > 0 )
|
||||
{
|
||||
// Only restrict food for now. Water can be used to replenish lost energy so it is useful even without the food system.
|
||||
if ( Food[Item[usItemIndex].foodtype].bFoodPoints > 0 )
|
||||
@@ -3063,7 +3063,7 @@ UINT16 OBJECTTYPE::GetWeightOfObjectInStack(unsigned int index)
|
||||
}
|
||||
}
|
||||
// account for partially eaten food
|
||||
if ( gGameOptions.fFoodSystem && Item[usItem].foodtype > 0 )
|
||||
if ( UsingFoodSystem() && Item[usItem].foodtype > 0 )
|
||||
weight *= (FLOAT)((*this)[index])->data.objectStatus/100.0f;
|
||||
}
|
||||
else if ( pItem->usItemClass == IC_AMMO && gGameExternalOptions.fAmmoDynamicWeight == TRUE )//Pulmu: added weight allowance for ammo not being full
|
||||
@@ -15366,7 +15366,7 @@ BOOL AddToRandomListFromItem( UINT16 usItem )
|
||||
if ( Item[usItem].ubCoolness <= rditemmaxcoolness )
|
||||
{
|
||||
// if item is food, not drug or canteen, and food system is off, don't add this
|
||||
if ( !gGameOptions.fFoodSystem && Item[usItem].foodtype > 0 && Item[usItem].drugtype == 0 && Item[usItem].canteen == 0 )
|
||||
if ( !UsingFoodSystem() && Item[usItem].foodtype > 0 && Item[usItem].drugtype == 0 && Item[usItem].canteen == 0 )
|
||||
;
|
||||
else
|
||||
randomitemarray[itemcnt++] = usItem;
|
||||
|
||||
+1
-1
@@ -421,7 +421,7 @@ void RefreshSoldierMorale( SOLDIERTYPE * pSoldier )
|
||||
iActualMorale = iActualMorale * pSoldier->GetMoraleModifier();
|
||||
|
||||
// Flugente: ubMaxMorale can now be influenced by our food situation
|
||||
if ( gGameOptions.fFoodSystem )
|
||||
if ( UsingFoodSystem() )
|
||||
FoodMaxMoraleModifiy(pSoldier, &ubMaxMorale);
|
||||
|
||||
// Flugente: max morale can be lowered
|
||||
|
||||
@@ -1867,7 +1867,7 @@ BOOLEAN ExecuteOverhead( )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - hack! - resolve possible pending interrupt
|
||||
if(GetSoldier(&pSoldier, gusSelectedSoldier) && gGameOptions.fImprovedInterruptSystem )
|
||||
if ( GetSoldier(&pSoldier, gusSelectedSoldier) && UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( pSoldier->bActive )
|
||||
{
|
||||
@@ -2858,7 +2858,7 @@ BOOLEAN HandleAtNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for movement type of interupt, resolve it here
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( pSoldier, MOVEMENT_INTERRUPT ) )
|
||||
{
|
||||
@@ -9521,7 +9521,7 @@ SOLDIERTYPE *InternalReduceAttackBusyCount( )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for after-shot type of interupt, try to resolve it now
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( pSoldier, AFTERSHOT_INTERRUPT ) )
|
||||
{
|
||||
|
||||
+2
-2
@@ -974,7 +974,7 @@ void DeductPoints( SOLDIERTYPE *pSoldier, INT16 sAPCost, INT32 iBPCost, UINT8 ub
|
||||
{
|
||||
// Flugente: if we GAIN breath points, adjust them - if we are hungry, we get fewer points back
|
||||
// Flugente: ubMaxMorale can now be influenced by our food situation
|
||||
if ( iBPCost < 0 && gGameOptions.fFoodSystem )
|
||||
if ( iBPCost < 0 && UsingFoodSystem() )
|
||||
ReduceBPRegenForHunger(pSoldier, &iBPCost);
|
||||
|
||||
// Flugente: backgrounds
|
||||
@@ -1059,7 +1059,7 @@ void DeductPoints( SOLDIERTYPE *pSoldier, INT16 sAPCost, INT32 iBPCost, UINT8 ub
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - Interrupt counter
|
||||
if( gGameOptions.fImprovedInterruptSystem && sAPCost > 0 && ubInterruptType != DISABLED_INTERRUPT )
|
||||
if( UsingImprovedInterruptSystem() && sAPCost > 0 && ubInterruptType != DISABLED_INTERRUPT )
|
||||
{
|
||||
UINT8 ubPointsRegistered = 0;
|
||||
UINT16 uCnt = 0;
|
||||
|
||||
@@ -2469,13 +2469,13 @@ void ReduceAttachmentsOnGunForNonPlayerChars(SOLDIERTYPE *pSoldier, OBJECTTYPE *
|
||||
|
||||
//Not meant for use in OAS.
|
||||
Assert(UsingNewAttachmentSystem()==true);
|
||||
|
||||
//OBJECTTYPE * pObj = &(pSoldier->inv[ invSlot ]);
|
||||
|
||||
|
||||
//If this item has any attachments, is not from a player, and is overwriteable. It's also only for guns.
|
||||
if((*pObj)[0]->AttachmentListSize() > 0 && pSoldier->bTeam != gbPlayerNum && !((*pObj).fFlags & OBJECT_NO_OVERWRITE) && Item[pObj->usItem].usItemClass == IC_GUN && !gGameOptions.fEnemiesDropAllItems){
|
||||
if((*pObj)[0]->AttachmentListSize() > 0 && pSoldier->bTeam != gbPlayerNum && !((*pObj).fFlags & OBJECT_NO_OVERWRITE) && Item[pObj->usItem].usItemClass == IC_GUN && !UsingEnemiesDropAllItemsSystem() )
|
||||
{
|
||||
UINT8 slotCount = 0;
|
||||
for(std::list<OBJECTTYPE>::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter, ++slotCount){
|
||||
for(std::list<OBJECTTYPE>::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter, ++slotCount)
|
||||
{
|
||||
//A few conditions under which we will not delete this attachment
|
||||
if(!iter->exists())
|
||||
continue;
|
||||
|
||||
@@ -3264,7 +3264,7 @@ UINT8 ubItemsNotCounted = 0; //ja25 UB
|
||||
pricepercentage = max( 0, 100 + (fDealerSelling ? -1 : 1) * gpSMCurrentMerc->GetBackgroundValue( BG_PERC_PRICES_GUNS ) );
|
||||
|
||||
// Even without backgrounds, Flo gets a discount. Read her M.E.R.C. profile to understand why
|
||||
if ( !gGameOptions.fBackGround && gpSMCurrentMerc->ubProfile == FLO )
|
||||
if ( !UsingBackGroundSystem() && gpSMCurrentMerc->ubProfile == FLO )
|
||||
pricepercentage = max( 0, 100 + (fDealerSelling ? -1 : 1) * FLO_DISCOUNT_PERCENTAGE );
|
||||
}
|
||||
else if ( Item [ usItemID ].usItemClass & (IC_MAPFILTER_MELEE|IC_MAPFILTER_KIT|IC_MAPFILTER_LBE|IC_MAPFILTER_ARMOR|IC_MAPFILTER_MISC) )
|
||||
|
||||
@@ -625,11 +625,10 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
if ( pSoldier->usAnimState == START_COWER || pSoldier->usAnimState == START_COWER_CROUCHED || pSoldier->usAnimState == START_COWER_PRONE )
|
||||
{
|
||||
UnSetUIBusy( pSoldier->ubID );
|
||||
}
|
||||
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for after-attack type of interupt, try to resolve it now
|
||||
else if ( gGameOptions.fImprovedInterruptSystem )
|
||||
else if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( pSoldier, AFTERACTION_INTERRUPT ) )
|
||||
{
|
||||
@@ -2286,7 +2285,7 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for before-attack type of interupt, try to resolve it now
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( pSoldier, BEFORESHOT_INTERRUPT ) )
|
||||
{
|
||||
@@ -3021,7 +3020,7 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - if pending interrupt flag was set for after-attack type of interupt, try to resolve it now
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
ResolvePendingInterrupt( pSoldier, AFTERACTION_INTERRUPT );
|
||||
}
|
||||
|
||||
@@ -5009,7 +5009,7 @@ void SOLDIERTYPE::EVENT_FireSoldierWeapon( INT32 sTargetGridNo )
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - hack! - an interrupt pending before shot
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
if ( ResolvePendingInterrupt( this, BEFORESHOT_INTERRUPT ) )
|
||||
{
|
||||
@@ -14451,7 +14451,7 @@ void SOLDIERTYPE::SoldierInventoryCoolDown( void )
|
||||
// handle flashlight. This is necessary in this location, as we need to do this at least once per turn
|
||||
this->HandleFlashLights( );
|
||||
|
||||
if ( !gGameExternalOptions.fWeaponOverheating && !gGameOptions.fFoodSystem )
|
||||
if ( !gGameExternalOptions.fWeaponOverheating && !UsingFoodSystem() )
|
||||
return;
|
||||
|
||||
INT8 numStacks = (INT8)this->inv.size( ); // remember inventorysize, so we don't call size() repeatedly
|
||||
@@ -16811,7 +16811,7 @@ void SOLDIERTYPE::SwitchWeapons( BOOLEAN fKnife, BOOLEAN fSideArm )
|
||||
// execute swap
|
||||
if ( handCanMove == TRUE && searchitemCanMove == TRUE )
|
||||
{
|
||||
if ( gGameOptions.fInventoryCostsAP )
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
{
|
||||
UINT16 APTotalCost = 0;
|
||||
|
||||
@@ -17243,7 +17243,7 @@ INT8 SOLDIERTYPE::GetSoldierProfileType( UINT8 usTeam )
|
||||
// Flugente: do we have a specific background flag?
|
||||
BOOLEAN SOLDIERTYPE::HasBackgroundFlag( UINT64 aFlag )
|
||||
{
|
||||
if ( gGameOptions.fBackGround && this->ubProfile != NO_PROFILE )
|
||||
if ( UsingBackGroundSystem() && this->ubProfile != NO_PROFILE )
|
||||
{
|
||||
if ( zBackground[gMercProfiles[this->ubProfile].usBackground].uiFlags & aFlag )
|
||||
return TRUE;
|
||||
@@ -17254,7 +17254,7 @@ BOOLEAN SOLDIERTYPE::HasBackgroundFlag( UINT64 aFlag )
|
||||
|
||||
INT16 SOLDIERTYPE::GetBackgroundValue( UINT16 aNr )
|
||||
{
|
||||
if ( gGameOptions.fBackGround && this->ubProfile != NO_PROFILE )
|
||||
if ( UsingBackGroundSystem() && this->ubProfile != NO_PROFILE )
|
||||
{
|
||||
return zBackground[gMercProfiles[this->ubProfile].usBackground].value[aNr];
|
||||
}
|
||||
@@ -19096,7 +19096,7 @@ void SOLDIERTYPE::PrintDiseaseDesc( CHAR16* apStr, BOOLEAN fFullDesc )
|
||||
|
||||
void SOLDIERTYPE::PrintFoodDesc( CHAR16* apStr, BOOLEAN fFullDesc )
|
||||
{
|
||||
if ( !gGameOptions.fFoodSystem )
|
||||
if ( !UsingFoodSystem() )
|
||||
return;
|
||||
|
||||
// only for living mercs with a profile
|
||||
@@ -22735,7 +22735,7 @@ UINT8 RegainDamagedStats( SOLDIERTYPE * pSoldier, UINT16 usAmountRegainedHundred
|
||||
}
|
||||
|
||||
// Flugente: Third, heal damage from starvation if possible
|
||||
if ( !gGameOptions.fFoodSystem || (gGameOptions.fFoodSystem && ubAmountRegained > 0 && pSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold) )
|
||||
if ( !UsingFoodSystem() || ( ubAmountRegained > 0 && pSoldier->bFoodLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold && pSoldier->bDrinkLevel > FoodMoraleMods[FOOD_NORMAL].bThreshold) )
|
||||
{
|
||||
// if we have a damaged stat here
|
||||
if ( pSoldier->usStarveDamageHealth > 0 )
|
||||
|
||||
@@ -1058,7 +1058,7 @@ void StartInterrupt( void )
|
||||
{
|
||||
// SANDRO - we don't use the "hidden interrupt" feature with IIS
|
||||
// sevenfm: all interrupts in original interrupt system start as hidden and revealed later if soldier decides something
|
||||
if ( !is_networked && pTempSoldier->bTeam != OUR_TEAM && !gGameOptions.fImprovedInterruptSystem )
|
||||
if ( !is_networked && pTempSoldier->bTeam != OUR_TEAM && !UsingImprovedInterruptSystem() )
|
||||
{
|
||||
// we're being interrupted by the computer!
|
||||
// we delay displaying any interrupt message until the computer does something...
|
||||
@@ -2045,7 +2045,7 @@ BOOLEAN InterruptDuel( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOpponent)
|
||||
BOOLEAN fResult = FALSE;
|
||||
|
||||
// sevenfm: if Ctrl+D pressed - skip all player interrupts for this turn
|
||||
if( !is_networked && !gGameOptions.fImprovedInterruptSystem && pSoldier->bTeam == OUR_TEAM && gTacticalStatus.ubDisablePlayerInterrupts )
|
||||
if( !is_networked && !UsingImprovedInterruptSystem() && pSoldier->bTeam == OUR_TEAM && gTacticalStatus.ubDisablePlayerInterrupts )
|
||||
return FALSE;
|
||||
|
||||
// if opponent can't currently see us and we can see them
|
||||
@@ -2552,7 +2552,7 @@ void ResolveInterruptsVs( SOLDIERTYPE * pSoldier, UINT8 ubInterruptType)
|
||||
// add this guy to everyone's interrupt queue
|
||||
AddToIntList(ubIntList[ubSmallestSlot],TRUE,TRUE);
|
||||
// SANDRO - for IIS, reset counter if we got here
|
||||
if ( gGameOptions.fImprovedInterruptSystem )
|
||||
if ( UsingImprovedInterruptSystem() )
|
||||
{
|
||||
// reset the counter
|
||||
MercPtrs[ ubIntList[ubSmallestSlot] ]->aiData.ubInterruptCounter[pSoldier->ubID] = 0;
|
||||
|
||||
@@ -8601,16 +8601,15 @@ void HandleTacticalStoreInvItem( void )
|
||||
}
|
||||
|
||||
// calculate needed APs
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
{
|
||||
APTotalCost += GetInvMovementCost(&pSoldier->inv[HANDPOS], HANDPOS, ubStoreSlot );
|
||||
if( !EnoughPoints( pSoldier, APTotalCost, 0, TRUE ) )
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
// move item from HANDPOS to found ubStoreSlot
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
// move item from HANDPOS to found ubStoreSlot
|
||||
DeductPoints( pSoldier, APTotalCost, 0 );
|
||||
}
|
||||
|
||||
pSoldier->inv[HANDPOS].MoveThisObjectTo(pSoldier->inv[ubStoreSlot], 1, pSoldier);
|
||||
|
||||
@@ -8687,7 +8686,7 @@ void HandleTacticalTakeInvItem( INT32 iType )
|
||||
pSoldier->usQuickItemId = pSoldier->inv[ubItemSlot].usItem;
|
||||
pSoldier->ubQuickItemSlot = ubItemSlot;
|
||||
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
{
|
||||
APTotalCost += GetInvMovementCost(&pSoldier->inv[ubItemSlot], ubItemSlot, HANDPOS);
|
||||
if( !EnoughPoints( pSoldier, APTotalCost, 0, TRUE ) )
|
||||
@@ -8705,7 +8704,7 @@ void HandleTacticalTakeInvItem( INT32 iType )
|
||||
HandleTBSwapHands();
|
||||
|
||||
// move item to handpos
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
DeductPoints( pSoldier, APTotalCost, 0 );
|
||||
pSoldier->inv[ubItemSlot].MoveThisObjectTo(pSoldier->inv[HANDPOS], 1, pSoldier);
|
||||
|
||||
@@ -8753,7 +8752,7 @@ void HandleTacticalDropItem( UINT8 ubSlot )
|
||||
|
||||
if( pSoldier->inv[ ubSlot ].exists() )
|
||||
{
|
||||
if (gGameOptions.fInventoryCostsAP)
|
||||
if ( UsingInventoryCostsAPSystem() )
|
||||
{
|
||||
APTotalCost += GetInvMovementCost(&pSoldier->inv[ubSlot], ubSlot, HANDPOS);
|
||||
APTotalCost += GetBasicAPsToPickupItem( pSoldier );
|
||||
|
||||
@@ -879,7 +879,7 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
|
||||
if ((gTacticalStatus.uiFlags & TURNBASED) &&
|
||||
(gTacticalStatus.uiFlags & INCOMBAT) &&
|
||||
(ubSightFlags & SIGHT_INTERRUPT) &&
|
||||
(!gGameOptions.fImprovedInterruptSystem || (gGameOptions.fImprovedInterruptSystem && gGameExternalOptions.fAllowInstantInterruptsOnSight) ) )
|
||||
(!UsingImprovedInterruptSystem() || gGameExternalOptions.fAllowInstantInterruptsOnSight ) )
|
||||
{
|
||||
ResolveInterruptsVs( pSoldier, SIGHTINTERRUPT );
|
||||
}
|
||||
@@ -7389,7 +7389,7 @@ void NoticeUnseenAttacker( SOLDIERTYPE * pAttacker, SOLDIERTYPE * pDefender, INT
|
||||
}
|
||||
}
|
||||
|
||||
if ( !gGameOptions.fImprovedInterruptSystem || (gGameOptions.fImprovedInterruptSystem && gGameExternalOptions.fAllowInstantInterruptsOnSight) )
|
||||
if ( !UsingImprovedInterruptSystem() || gGameExternalOptions.fAllowInstantInterruptsOnSight )
|
||||
{
|
||||
if ( StandardInterruptConditionsMet( pDefender, pAttacker->ubID, bOldOppList ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user