mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
DISEASE_CONTAMINATES_ITEMS controls wether contaminated food/blades/throwing knifes can infect people.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7649 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1681,6 +1681,7 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.fDisease = iniReader.ReadBoolean( "Disease Settings", "DISEASE", FALSE );
|
||||
gGameExternalOptions.fDiseaseStrategic = iniReader.ReadBoolean( "Disease Settings", "DISEASE_STRATEGIC", FALSE );
|
||||
gGameExternalOptions.sDiseaseWHOSubscriptionCost = iniReader.ReadInteger( "Disease Settings", "DISEASE_WHO_SUBSCRIPTIONCOST", 2000, 1000, 10000 );
|
||||
gGameExternalOptions.fDiseaseContaminatesItems = iniReader.ReadBoolean( "Disease Settings", "DISEASE_CONTAMINATES_ITEMS", TRUE );
|
||||
|
||||
//################# Strategic Gamestart Settings ##################
|
||||
|
||||
|
||||
@@ -414,6 +414,7 @@ typedef struct
|
||||
BOOLEAN fDisease;
|
||||
BOOLEAN fDiseaseStrategic;
|
||||
INT32 sDiseaseWHOSubscriptionCost;
|
||||
BOOLEAN fDiseaseContaminatesItems;
|
||||
|
||||
//Animation settings
|
||||
FLOAT giPlayerTurnSpeedUpFactor;
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ BOOLEAN ApplyFood( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObject, BOOLEAN fForce, B
|
||||
if ( pSoldier->sDiseasePoints[0] > 0 )
|
||||
(*pObject)[0]->data.sObjectFlag |= INFECTED;
|
||||
// if object is infected, infect the victim
|
||||
else if ( (*pObject)[0]->data.sObjectFlag & INFECTED )
|
||||
else if ( (*pObject)[0]->data.sObjectFlag & INFECTED && gGameExternalOptions.fDiseaseContaminatesItems )
|
||||
pSoldier->Infect( 0 );
|
||||
|
||||
// now remove a portion of the food item (or the whole item altogether)
|
||||
|
||||
+1
-1
@@ -2628,7 +2628,7 @@ BOOLEAN BulletHitMerc( BULLET * pBullet, STRUCTURE * pStructure, BOOLEAN fIntend
|
||||
}
|
||||
|
||||
// Flugente: if bullet is infected, give us disease (this is intended for throwing knifes)
|
||||
if ( pBullet->usFlags & BULLET_FLAG_INFECTED )
|
||||
if ( pBullet->usFlags & BULLET_FLAG_INFECTED && gGameExternalOptions.fDiseaseContaminatesItems )
|
||||
{
|
||||
// infect us with the first disease
|
||||
pTarget->Infect( 0 );
|
||||
|
||||
@@ -5799,7 +5799,7 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1
|
||||
}
|
||||
|
||||
// Flugente: if the blade is infected, infect the victim
|
||||
if ( *&(MercPtrs[ubAttackerID]->inv[HANDPOS])[0]->data.sObjectFlag & INFECTED )
|
||||
if ( *&(MercPtrs[ubAttackerID]->inv[HANDPOS])[0]->data.sObjectFlag & INFECTED && gGameExternalOptions.fDiseaseContaminatesItems )
|
||||
{
|
||||
// infect us with the first disease
|
||||
this->Infect( 0 );
|
||||
|
||||
Reference in New Issue
Block a user