mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- renamed AC_SUPPRESSOR to AC_MUZZLE
- mercs with average refinement get a morale penalty if they care extremely about refinement and the other merc is a slob or snob - added code for soldier-specific interrupt modifier - added belgian and portoguese nationalities - Fix: race, sexism etc. xml data didn't correctly overwrite PROF.DAT data git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6519 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -171,7 +171,7 @@ BobbyRayPurchaseStruct BobbyRayPurchases[ 100 ];
|
||||
//Madd: new BR filters
|
||||
#define BR_MISC_FILTER_OPTICS (AC_SCOPE | AC_SIGHT | AC_IRONSIGHT)
|
||||
#define BR_MISC_FILTER_SIDE_BOTTOM (AC_LASER | AC_FOREGRIP | AC_BIPOD)
|
||||
#define BR_MISC_FILTER_MUZZLE (AC_SUPPRESSOR | AC_EXTENDER)
|
||||
#define BR_MISC_FILTER_MUZZLE (AC_MUZZLE | AC_EXTENDER)
|
||||
#define BR_MISC_FILTER_STOCK AC_STOCK
|
||||
#define BR_MISC_FILTER_INTERNAL (AC_MAGWELL | AC_INTERNAL | AC_EXTERNAL)
|
||||
#define BR_MISC_FILTER_STD_ATTACHMENTS (BR_MISC_FILTER_OPTICS | BR_MISC_FILTER_SIDE_BOTTOM | BR_MISC_FILTER_MUZZLE | BR_MISC_FILTER_STOCK | BR_MISC_FILTER_INTERNAL)
|
||||
|
||||
@@ -644,7 +644,7 @@ extern OBJECTTYPE gTempObject;
|
||||
// redesigned by Flugente on 12-04-10
|
||||
// Chrisl: Define attachment classes
|
||||
#define AC_BIPOD 0x00000001 //1
|
||||
#define AC_SUPPRESSOR 0x00000002 //2
|
||||
#define AC_MUZZLE 0x00000002 //2
|
||||
#define AC_LASER 0x00000004 //4
|
||||
#define AC_SIGHT 0x00000008 //8
|
||||
#define AC_SCOPE 0x00000010 //16
|
||||
|
||||
@@ -1172,10 +1172,16 @@ void HourlyMoraleUpdate( void )
|
||||
}
|
||||
|
||||
// some people care about how distuingished other people are. Malus if on different ends of the spectrum, a small bonus if on the same and its really important to the person
|
||||
// also give a malus if the other person is a slob or snob and we are average but care extremely (we don't like people who behave differently)
|
||||
switch ( gMercProfiles[ pOtherSoldier->ubProfile ].bRefinement )
|
||||
{
|
||||
case REFINEMENT_SLOB:
|
||||
{
|
||||
if ( pProfile->bRefinement == REFINEMENT_AVERAGE )
|
||||
{
|
||||
if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRefinement;
|
||||
}
|
||||
if ( pProfile->bRefinement == REFINEMENT_SLOB )
|
||||
{
|
||||
if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
|
||||
@@ -1192,6 +1198,11 @@ void HourlyMoraleUpdate( void )
|
||||
break;
|
||||
case REFINEMENT_SNOB:
|
||||
{
|
||||
if ( pProfile->bRefinement == REFINEMENT_AVERAGE )
|
||||
{
|
||||
if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
|
||||
bOpinion -= gGameExternalOptions.sMoraleModRefinement;
|
||||
}
|
||||
if ( pProfile->bRefinement == REFINEMENT_SNOB )
|
||||
{
|
||||
if ( pProfile->bRefinementCareLevel == CARELEVEL_EXTREME )
|
||||
|
||||
@@ -16873,6 +16873,13 @@ UINT8 SOLDIERTYPE::GetMoraleThreshold()
|
||||
return min(threshold, max(0, threshold - moraledamage));
|
||||
}
|
||||
|
||||
INT16 SOLDIERTYPE::GetInterruptModifier( UINT8 usDistance )
|
||||
{
|
||||
INT16 bonus = 0;
|
||||
|
||||
return bonus;
|
||||
}
|
||||
|
||||
void SOLDIERTYPE::SoldierPropertyUpkeep()
|
||||
{
|
||||
// these flags are only used for the first turn, and thus always removed
|
||||
|
||||
@@ -1603,6 +1603,7 @@ public:
|
||||
INT16 GetAPBonus();
|
||||
INT8 GetFearResistanceBonus(); // fear resistance lowers shock and morale damage from horror
|
||||
UINT8 GetMoraleThreshold();
|
||||
INT16 GetInterruptModifier( UINT8 usDistance );
|
||||
|
||||
void SoldierPropertyUpkeep(); // update functions for various properties (updating counters, resetting flags etc.)
|
||||
|
||||
|
||||
@@ -2587,6 +2587,17 @@ void OverwriteMercProfileWithXMLData( UINT32 uiLoop )
|
||||
gMercProfiles[ uiLoop ].bLearnToHate = tempProfiles[ uiLoop ].bLearnToHate ;
|
||||
gMercProfiles[ uiLoop ].bLearnToHateTime = tempProfiles[ uiLoop ].bLearnToHateTime ;
|
||||
|
||||
gMercProfiles[ uiLoop ].bRace = tempProfiles[ uiLoop ].bRace;
|
||||
gMercProfiles[ uiLoop ].bNationality = tempProfiles[ uiLoop ].bNationality;
|
||||
gMercProfiles[ uiLoop ].bAppearance = tempProfiles[ uiLoop ].bAppearance;
|
||||
gMercProfiles[ uiLoop ].bAppearanceCareLevel = tempProfiles[ uiLoop ].bAppearanceCareLevel;
|
||||
gMercProfiles[ uiLoop ].bRefinement = tempProfiles[ uiLoop ].bRefinement;
|
||||
gMercProfiles[ uiLoop ].bRefinementCareLevel = tempProfiles[ uiLoop ].bRefinementCareLevel;
|
||||
gMercProfiles[ uiLoop ].bHatedNationality = tempProfiles[ uiLoop ].bHatedNationality;
|
||||
gMercProfiles[ uiLoop ].bHatedNationalityCareLevel = tempProfiles[ uiLoop ].bHatedNationalityCareLevel;
|
||||
gMercProfiles[ uiLoop ].bRacist = tempProfiles[ uiLoop ].bRacist;
|
||||
gMercProfiles[ uiLoop ].bSexist = tempProfiles[ uiLoop ].bSexist;
|
||||
|
||||
gMercProfiles[ uiLoop ].sSalary = tempProfiles[ uiLoop ].sSalary ;
|
||||
gMercProfiles[ uiLoop ].uiWeeklySalary = tempProfiles[ uiLoop ].uiWeeklySalary ;
|
||||
gMercProfiles[ uiLoop ].uiBiWeeklySalary = tempProfiles[ uiLoop ].uiBiWeeklySalary ;
|
||||
|
||||
@@ -1943,7 +1943,10 @@ INT8 CalcInterruptDuelPts( SOLDIERTYPE * pSoldier, UINT8 ubOpponentID, BOOLEAN f
|
||||
else if ( pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_PERCEPTION ] )
|
||||
{
|
||||
iPoints -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Flugente: interrupt modifier from special stats
|
||||
iPoints += pSoldier->GetInterruptModifier( ubDistance );
|
||||
|
||||
// if he's a computer soldier
|
||||
|
||||
|
||||
@@ -273,6 +273,8 @@ typedef enum
|
||||
SWEDISH,
|
||||
IRAQI, // 40
|
||||
SYRIAN,
|
||||
BELGIAN,
|
||||
PORTOGUESE,
|
||||
|
||||
NUM_NATIONALITIES
|
||||
} Nationalities;
|
||||
|
||||
@@ -7788,6 +7788,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
@@ -7805,6 +7805,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
@@ -7788,6 +7788,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
@@ -7790,6 +7790,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
@@ -7614,6 +7614,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
@@ -7792,6 +7792,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
@@ -7816,6 +7816,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
@@ -7790,6 +7790,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
@@ -7807,6 +7807,8 @@ STR16 szNationalityText[]=
|
||||
L"swedish",
|
||||
L"iraqi", // 40
|
||||
L"syrian",
|
||||
L"belgian",
|
||||
L"portoguese",
|
||||
};
|
||||
|
||||
// special text used if we do not hate any nation (value of -1)
|
||||
|
||||
Reference in New Issue
Block a user