mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Disease protection items are no longer required to be worn in a faceslot. The point is that the player should acquire special gear, not inconvenience him to switch gear whenever a merc goes on assignment.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7852 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2702,14 +2702,14 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
||||
//////////////////// DISEASE
|
||||
if ( gGameExternalOptions.fDisease )
|
||||
{
|
||||
if ( HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_FACE ) )
|
||||
if ( HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_1 ) )
|
||||
{
|
||||
swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[38], szUDBGenSecondaryStatsExplanationsTooltipText[38] );
|
||||
SetRegionFastHelpText( &(gUDBFasthelpRegions[iFirstDataRegion + cnt]), pStr );
|
||||
MSYS_EnableRegion( &gUDBFasthelpRegions[iFirstDataRegion + cnt] );
|
||||
cnt++;
|
||||
}
|
||||
else if ( HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_HAND ) )
|
||||
else if ( HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) )
|
||||
{
|
||||
swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[39], szUDBGenSecondaryStatsExplanationsTooltipText[39] );
|
||||
SetRegionFastHelpText( &(gUDBFasthelpRegions[iFirstDataRegion + cnt]), pStr );
|
||||
@@ -6282,14 +6282,14 @@ void DrawSecondaryStats( OBJECTTYPE * gpItemDescObject )
|
||||
//////////////////// DISEASE
|
||||
if ( gGameExternalOptions.fDisease )
|
||||
{
|
||||
if ( (HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_FACE ) && !fComparisonMode) ||
|
||||
(fComparisonMode && HasItemFlag( gpComparedItemDescObject->usItem, DISEASEPROTECTION_FACE )) )
|
||||
if ( (HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_1 ) && !fComparisonMode) ||
|
||||
(fComparisonMode && HasItemFlag( gpComparedItemDescObject->usItem, DISEASEPROTECTION_1 )) )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 37, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
++cnt;
|
||||
}
|
||||
else if ( (HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_HAND ) && !fComparisonMode) ||
|
||||
(fComparisonMode && HasItemFlag( gpComparedItemDescObject->usItem, DISEASEPROTECTION_HAND )) )
|
||||
else if ( (HasItemFlag( gpItemDescObject->usItem, DISEASEPROTECTION_2 ) && !fComparisonMode) ||
|
||||
(fComparisonMode && HasItemFlag( gpComparedItemDescObject->usItem, DISEASEPROTECTION_2 )) )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 37, gItemDescGenSecondaryRegions[cnt].sLeft + sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop + sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
++cnt;
|
||||
|
||||
@@ -766,8 +766,8 @@ extern OBJECTTYPE gTempObject;
|
||||
#define POWER_PACK 0x08000000 //134217728 // item continously powers an item it is attached to
|
||||
|
||||
#define ROOF_COLLAPSE_ITEM 0x10000000 //268435456 // this item is required in the collapsing of roof tiles. It is used internally and should never be seen by the player
|
||||
#define DISEASEPROTECTION_FACE 0x20000000 //536870912 // this item protects us from getting diseases by human contact if worn in a face slot
|
||||
#define DISEASEPROTECTION_HAND 0x40000000 //1073741824 // this item protects us from getting diseases by human contact if kept in inventory
|
||||
#define DISEASEPROTECTION_1 0x20000000 //536870912 // this item protects us from getting diseases by human contact if kept in inventory
|
||||
#define DISEASEPROTECTION_2 0x40000000 //1073741824 // this item protects us from getting diseases by human contact if kept in inventory
|
||||
/*#define PLAYER_NET_4_LVL_4 0x80000000 //2147483648*/
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
|
||||
+1
-1
@@ -12233,7 +12233,7 @@ INT8 FindDisarmKit( SOLDIERTYPE * pSoldier )
|
||||
if (pSoldier->inv[bLoop].exists() == true) {
|
||||
if ( ( ( Item[pSoldier->inv[bLoop].usItem].DisarmModifier * pSoldier->inv[bLoop][0]->data.objectStatus ) / 100 ) > bonus )
|
||||
{
|
||||
bonus = Item[pSoldier->inv[bLoop].usItem].DisarmModifier * pSoldier->inv[bLoop][0]->data.objectStatus / 100;;
|
||||
bonus = Item[pSoldier->inv[bLoop].usItem].DisarmModifier * pSoldier->inv[bLoop][0]->data.objectStatus / 100;
|
||||
FoundKit = bLoop;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18920,15 +18920,12 @@ FLOAT SOLDIERTYPE::GetDiseaseContactProtection( )
|
||||
OBJECTTYPE* pObj = &(inv[bLoop]);
|
||||
|
||||
if ( pObj && (*pObj)[0]->data.objectStatus >= USABLE )
|
||||
{
|
||||
if ( (bLoop == HEAD1POS || bLoop == HEAD2POS) )
|
||||
{
|
||||
if ( HasItemFlag( pObj->usItem, DISEASEPROTECTION_1 ) )
|
||||
{
|
||||
if ( HasItemFlag( pObj->usItem, DISEASEPROTECTION_FACE ) )
|
||||
{
|
||||
bestfacegear = max( bestfacegear, (FLOAT)((*pObj)[0]->data.objectStatus / 100) );
|
||||
}
|
||||
bestfacegear = max( bestfacegear, (FLOAT)((*pObj)[0]->data.objectStatus / 100) );
|
||||
}
|
||||
else if ( HasItemFlag( pObj->usItem, DISEASEPROTECTION_HAND ) )
|
||||
else if ( HasItemFlag( pObj->usItem, DISEASEPROTECTION_2 ) )
|
||||
{
|
||||
bestprotectivegear = max( bestprotectivegear, (FLOAT)((*pObj)[0]->data.objectStatus / 100) );
|
||||
}
|
||||
|
||||
+4
-4
@@ -1466,7 +1466,7 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
BOOLEAN val = (BOOLEAN)atol( pData->szCharData );
|
||||
|
||||
if ( val )
|
||||
pData->curItem.usItemFlag |= DISEASEPROTECTION_FACE;
|
||||
pData->curItem.usItemFlag |= DISEASEPROTECTION_1;
|
||||
}
|
||||
else if ( strcmp( name, "diseaseprotectionhand" ) == 0 )
|
||||
{
|
||||
@@ -1474,7 +1474,7 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
BOOLEAN val = (BOOLEAN)atol( pData->szCharData );
|
||||
|
||||
if ( val )
|
||||
pData->curItem.usItemFlag |= DISEASEPROTECTION_HAND;
|
||||
pData->curItem.usItemFlag |= DISEASEPROTECTION_2;
|
||||
}
|
||||
|
||||
--pData->maxReadDepth;
|
||||
@@ -2109,9 +2109,9 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile, "\t\t<sBackpackWeightModifier>%d</sBackpackWeightModifier>\r\n", Item[cnt].sBackpackWeightModifier);
|
||||
FilePrintf(hFile, "\t\t<fAllowClimbing>%d</fAllowClimbing>\r\n", Item[cnt].fAllowClimbing);
|
||||
|
||||
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_FACE )
|
||||
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_1 )
|
||||
FilePrintf( hFile, "\t\t<diseaseprotectionface>%d</diseaseprotectionface>\r\n", 1 );
|
||||
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_HAND )
|
||||
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_2 )
|
||||
FilePrintf( hFile, "\t\t<diseaseprotectionhand>%d</diseaseprotectionhand>\r\n", 1 );
|
||||
|
||||
FilePrintf(hFile,"\t</ITEM>\r\n");
|
||||
|
||||
Reference in New Issue
Block a user