mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
'Disease->Diagnose' assignment also checks for contaminated items and marks them permanently
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8595 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4051,6 +4051,26 @@ void INVRenderItem( UINT32 uiBuffer, SOLDIERTYPE * pSoldier, OBJECTTYPE *pObjec
|
||||
gprintfinvalidate( sNewX, sNewY, pStr );
|
||||
}
|
||||
|
||||
// Flugente: if this object is contaminated and we know that, show it
|
||||
if ( gGameExternalOptions.fDisease && gGameExternalOptions.fDiseaseContaminatesItems &&
|
||||
( *pObject )[0]->data.sObjectFlag & INFECTED && ( *pObject )[0]->data.sObjectFlag & INFECTION_DIAGNOSED )
|
||||
{
|
||||
if ( !guiASSIGNMENTICONS )
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP( "INTERFACE\\AssignmentIcons.sti", VObjectDesc.ImageFile );
|
||||
AddVideoObject( &VObjectDesc, &guiASSIGNMENTICONS );
|
||||
}
|
||||
|
||||
sNewX = sX + 5; // rather arbitrary
|
||||
sNewY = sY;
|
||||
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiASSIGNMENTICONS, 28, sNewX, sNewY, VO_BLT_TRANSSHADOW, NULL );
|
||||
|
||||
RestoreExternBackgroundRect( sNewX, sNewY, 15, 15 );
|
||||
}
|
||||
|
||||
if ( gGameExternalOptions.fScopeModes && gGameExternalOptions.fDisplayScopeModes
|
||||
&& pSoldier && pObject == &(pSoldier->inv[HANDPOS] ) && Item[pSoldier->inv[HANDPOS].usItem].usItemClass == IC_GUN )
|
||||
{
|
||||
|
||||
@@ -824,6 +824,7 @@ extern OBJECTTYPE gTempObject;
|
||||
|
||||
#define INFECTED 0x0000001000000000 // // this item is infected with disease 0, getting damaged by this will infect you
|
||||
#define DELAYED_GRENADE_EXPLOSION 0x0000002000000000 // // grenade will blow up on next turn
|
||||
#define INFECTION_DIAGNOSED 0x0000004000000000 // // the player knows that this item is infected
|
||||
|
||||
// Flugente TODO 2012-09-17: next time we break savegame compatibility, extend the flagmasks from UINT32 to UINT64. I didn't do it this time (see double-used flag above), as we try to minimise those breaks. But it is needed.
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user