- disease infection chances (percentage) is now read as float, valid numbers between 0.01 an 100.0

- lowered infection chances for swamp/tropical sectors and contact with humans/corpses
- infections on gunshot wounds only happen on severe wounds (damage taken > 20)
- lifeloss by bloodloss no longer leads to traumatic infections

Requires GameDir >= r2219 due to changed xml entries.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7770 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-03-06 21:42:32 +00:00
parent 66d4bc8a33
commit 62f0461f96
4 changed files with 99 additions and 91 deletions
+32 -24
View File
@@ -133,7 +133,7 @@ void HandleDisease()
if ( pSectorInfo->usInfected )
{
// infection is also possible by human contact
UINT32 usChance = Disease[0].usInfectionChance[INFECTION_TYPE_CONTACT_HUMAN];
FLOAT dChance = Disease[0].dInfectionChance[INFECTION_TYPE_CONTACT_HUMAN];
// if disease is known, mercs will avoid the infected, lowering the chance of them being infected
UINT16 max = min(20, pSectorInfo->usInfected);
@@ -142,7 +142,8 @@ void HandleDisease()
for ( UINT16 i = 0; i < max; ++i )
{
if ( Chance( usChance ) )
// chances can be smaller than 1%, so we use a trick here by altering our 'chance function'. This allows to have much smaller chances, as for diseases, 1% can be way too high.
if ( Random( 10000 ) < dChance * 100 )
HandlePossibleInfection( pSoldier, NULL, INFECTION_TYPE_CONTACT_HUMAN, 1.0f, TRUE );
}
}
@@ -152,13 +153,14 @@ void HandleDisease()
{
if ( pSectorInfo->usInfected < population )
{
if ( Chance( Disease[0].usInfectionChance[INFECTION_TYPE_CONTACT_HUMAN] ) )
// chances can be smaller than 1%, so we use a trick here by altering our 'chance function'. This allows to have much smaller chances, as for diseases, 1% can be way too high.
if ( Random( 10000 ) < Disease[0].dInfectionChance[INFECTION_TYPE_CONTACT_HUMAN] * 100 )
{
FLOAT infectedseverity = (FLOAT)Disease[0].sInfectionPtsInitial / (FLOAT)Disease[0].sInfectionPtsFull;
pSectorInfo->fInfectionSeverity = (pSectorInfo->fInfectionSeverity * pSectorInfo->usInfected + infectedseverity * 1) / (pSectorInfo->usInfected + 1);
++pSectorInfo->usInfected;
}
}
}
}
}
@@ -183,7 +185,7 @@ void HandleDisease()
if ( pSoldier->bActive )
{
UINT8 ubSector = (UINT8)SECTOR( pSoldier->sSectorX, pSoldier->sSectorY );
UINT8 ubTraverseType = SectorInfo[ubSector].ubTraversability[pSoldier->ubDirection];
UINT8 ubTraverseType = SectorInfo[ubSector].ubTraversability[THROUGH_STRATEGIC_MOVE];
switch ( ubTraverseType )
{
@@ -244,10 +246,11 @@ void HandleDisease()
case TROPICS:
case TROPICS_ROAD:
{
UINT32 usChance = Disease[0].usInfectionChance[INFECTION_TYPE_TROPICS];
FLOAT dChance = Disease[0].dInfectionChance[INFECTION_TYPE_TROPICS];
for ( UINT16 i = 0; i < lefttoinfect; ++i )
{
if ( Chance( usChance) )
// chances can be smaller than 1%, so we use a trick here by altering our 'chance function'. This allows to have much smaller chances, as for diseases, 1% can be way too high.
if ( Random( 10000 ) < dChance * 100 )
++newinfected;
}
}
@@ -255,10 +258,11 @@ void HandleDisease()
case SWAMP:
case SWAMP_ROAD:
{
UINT32 usChance = Disease[0].usInfectionChance[INFECTION_TYPE_SWAMP];
FLOAT dChance = Disease[0].dInfectionChance[INFECTION_TYPE_SWAMP];
for ( UINT16 i = 0; i < lefttoinfect; ++i )
{
if ( Chance( usChance ) )
// chances can be smaller than 1%, so we use a trick here by altering our 'chance function'. This allows to have much smaller chances, as for diseases, 1% can be way too high.
if ( Random( 10000 ) < dChance * 100 )
++newinfected;
}
}
@@ -270,11 +274,12 @@ void HandleDisease()
if ( lefttoinfect - newinfected > 1 && pSectorInfo->usInfected )
{
// infection is also possible by human contact
UINT32 usChance = Disease[0].usInfectionChance[INFECTION_TYPE_CONTACT_HUMAN];
FLOAT dChance = Disease[0].dInfectionChance[INFECTION_TYPE_CONTACT_HUMAN];
UINT16 max = sqrt( (FLOAT) min( lefttoinfect - newinfected, pSectorInfo->usInfected ) );
for ( UINT16 i = 0; i < max; ++i )
{
if ( Chance( usChance ) )
// chances can be smaller than 1%, so we use a trick here by altering our 'chance function'. This allows to have much smaller chances, as for diseases, 1% can be way too high.
if ( Random( 10000 ) < dChance * 100 )
++newinfected;
}
}
@@ -286,17 +291,18 @@ void HandleDisease()
FLOAT populationpercentage = (FLOAT)(lefttoinfect - newinfected) / (FLOAT)(population);
FLOAT basechance = sqrt( (FLOAT) min( lefttoinfect, pSectorInfo->usInfected + newinfected ) ) * 0.5f;
FLOAT chance_sex = Disease[0].usInfectionChance[INFECTION_TYPE_SEX] * basechance * populationpercentage;
FLOAT chance_sex = Disease[0].dInfectionChance[INFECTION_TYPE_SEX] * basechance * populationpercentage;
FLOAT chance_corpse = 0;
// if there was a fight here in the last 48 hours, then corpses will still be here - increase chance of infection
if ( pSectorInfo->uiTimeLastPlayerLiberated && pSectorInfo->uiTimeLastPlayerLiberated + (48 * 3600) > GetWorldTotalSeconds( ) )
chance_corpse = Disease[0].usInfectionChance[INFECTION_TYPE_CONTACT_CORPSE] * populationpercentage;
chance_corpse = Disease[0].dInfectionChance[INFECTION_TYPE_CONTACT_CORPSE] * populationpercentage;
if ( Chance( chance_sex ) )
// chances can be smaller than 1%, so we use a trick here by altering our 'chance function'. This allows to have much smaller chances, as for diseases, 1% can be way too high.
if ( Random( 10000 ) < chance_sex * 100 )
++newinfected;
if ( Chance( chance_corpse ) )
if ( Random( 10000 ) < chance_corpse * 100 )
++newinfected;
}
@@ -318,9 +324,10 @@ void HandleDisease()
if ( infectedothersector > DISEASE_STRATEGIC_ADJACENTINFECTION )
{
FLOAT percentage = (FLOAT)((lefttoinfect - newinfected) * Disease[0].usInfectionChance[INFECTION_TYPE_CONTACT_HUMAN]) / (FLOAT)(100 * population);
FLOAT percentage = (FLOAT)((lefttoinfect - newinfected) * Disease[0].dInfectionChance[INFECTION_TYPE_CONTACT_HUMAN]) / (FLOAT)(100 * population);
if ( Chance( 100 * percentage ) )
// chances can be smaller than 1%, so we use a trick here by altering ou 'chance function'. This allows to have much smaller chances, as for diseases, 1% can be way too high.
if ( Random( 10000 ) < percentage * 100 * 100 )
++newinfected;
}
}
@@ -405,33 +412,34 @@ void HandlePossibleInfection( SOLDIERTYPE *pSoldier, SOLDIERTYPE* pOtherSoldier,
continue;
// chance of infection by insects
UINT32 usChance = Disease[i].usInfectionChance[aInfectionType];
FLOAT dChance = Disease[i].dInfectionChance[aInfectionType];
// alter chance by modifier and disease resistance
usChance = usChance * aModifier * ( 100 - pSoldier->GetDiseaseResistance( ) ) / 100;
dChance = dChance * aModifier * (100 - pSoldier->GetDiseaseResistance( )) / 100;
if ( aInfectionType == INFECTION_TYPE_TROPICS || aInfectionType == INFECTION_TYPE_SWAMP )
{
// if we are afraid of insects, we will be more careful around them - lower chance to be infected
if ( gMercProfiles[pSoldier->ubProfile].bDisability == FEAR_OF_INSECTS )
usChance *= 0.7f;
dChance *= 0.7f;
}
else if ( aInfectionType == INFECTION_TYPE_CONTACT_HUMAN )
{
// if we check a specific soldier, he must have the disease himself
if ( pOtherSoldier && pOtherSoldier->sDiseasePoints[i] <= 0 )
usChance = 0;
dChance = 0;
// if we wear face or hand protection, lower chance of infection
usChance *= (1.0f - pSoldier->GetDiseaseContactProtection( ));
dChance *= (1.0f - pSoldier->GetDiseaseContactProtection( ));
}
else if ( aInfectionType == INFECTION_TYPE_CONTACT_CORPSE )
{
// if we wear face or hand protection, lower chance of infection
usChance *= (1.0f - pSoldier->GetDiseaseContactProtection( ));
dChance *= (1.0f - pSoldier->GetDiseaseContactProtection( ));
}
if ( Chance( usChance ) )
// chances ca be smaller than 1%, so we use a trick here by altering ou 'chance function'. This allows to have much smaller chances, as for diseases, 1% can be way too high.
if ( Random( 10000 ) < dChance * 100 )
{
// infect us
pSoldier->Infect( i );
+1 -1
View File
@@ -86,7 +86,7 @@ typedef struct
INT32 sInfectionPtsGainPerHour; // extra points gained every hour if infected
// infection chances and behaviour
UINT8 usInfectionChance[INFECTION_TYPE_MAX]; // percentage chance of being infected this way if conditions are fulfilled
FLOAT dInfectionChance[INFECTION_TYPE_MAX]; // percentage chance of being infected this way if conditions are fulfilled
UINT32 usDiseaseProperties; // properties of the disease
// effects of disease (effect at sInfectionPtsFull points), scaled
+6 -6
View File
@@ -10073,22 +10073,22 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sPo
this->usSoldierFlagMask |= SOLDIER_FRESHWOUND;
// Flugente we might get a disease from this...
if ( gGameExternalOptions.fDisease )
if ( gGameExternalOptions.fDisease && sLifeDeduct > 0 )
{
if ( ubAttacker != NOBODY && MercPtrs[ubAttacker] && CREATURE_OR_BLOODCAT( MercPtrs[ubAttacker] ) )
HandlePossibleInfection( this, MercPtrs[ubAttacker], INFECTION_TYPE_WOUND_ANIMAL );
if ( sLifeDeduct > 0 && ubReason == TAKE_DAMAGE_GUNFIRE )
if ( ubReason == TAKE_DAMAGE_GUNFIRE && sLifeDeduct > 20 )
HandlePossibleInfection( this, NULL, INFECTION_TYPE_WOUND_GUNSHOT );
else if ( sLifeDeduct > 0 && (ubReason == TAKE_DAMAGE_BLADE || ubReason == TAKE_DAMAGE_HANDTOHAND
|| ubReason == TAKE_DAMAGE_EXPLOSION || ubReason == TAKE_DAMAGE_STRUCTURE_EXPLOSION || ubReason == TAKE_DAMAGE_TENTACLES) )
else if ( ubReason == TAKE_DAMAGE_BLADE || ubReason == TAKE_DAMAGE_HANDTOHAND
|| ubReason == TAKE_DAMAGE_EXPLOSION || ubReason == TAKE_DAMAGE_STRUCTURE_EXPLOSION || ubReason == TAKE_DAMAGE_TENTACLES )
{
FLOAT modifier = 0.5f + sLifeDeduct / 100;
HandlePossibleInfection( this, NULL, INFECTION_TYPE_WOUND_OPEN, modifier );
}
// possibly get traumatized if we're hit really bad
if ( this->stats.bLife < OKLIFE )
// possibly get traumatized if damage gets close to killing us (not if we're slowly bleeding)
if ( this->stats.bLife < OKLIFE && ubReason != TAKE_DAMAGE_BLOODLOSS )
HandlePossibleInfection( this, NULL, INFECTION_TYPE_TRAUMATIC );
}
+60 -60
View File
@@ -55,21 +55,21 @@ diseaseStartElementHandle( void *userData, const XML_Char *name, const XML_Char
strcmp( name, "sInfectionPtsOutbreak" ) == 0 ||
strcmp( name, "sInfectionPtsFull" ) == 0 ||
strcmp( name, "sInfectionPtsGainPerHour" ) == 0 ||
strcmp( name, "usInfectionChance_SWAMP" ) == 0 ||
strcmp( name, "usInfectionChance_TROPICS" ) == 0 ||
strcmp( name, "usInfectionChance_SEX" ) == 0 ||
strcmp( name, "usInfectionChance_CONTACT_HUMAN" ) == 0 ||
strcmp( name, "usInfectionChance_CONTACT_CORPSE" ) == 0 ||
strcmp( name, "usInfectionChance_WOUND_ANIMAL" ) == 0 ||
strcmp( name, "usInfectionChance_WOUND_OPEN" ) == 0 ||
strcmp( name, "usInfectionChance_WOUND_GUNSHOT" ) == 0 ||
strcmp( name, "usInfectionChance_WOUND_AGI" ) == 0 ||
strcmp( name, "usInfectionChance_WOUND_DEX" ) == 0 ||
strcmp( name, "usInfectionChance_WOUND_STR" ) == 0 ||
strcmp( name, "usInfectionChance_WOUND_WIS" ) == 0 ||
strcmp( name, "usInfectionChance_WOUND_TRAUMATIC" ) == 0 ||
strcmp( name, "usInfectionChance_BADFOOD" ) == 0 ||
strcmp( name, "usInfectionChance_BADWATER" ) == 0 ||
strcmp( name, "InfectionChance_SWAMP" ) == 0 ||
strcmp( name, "InfectionChance_TROPICS" ) == 0 ||
strcmp( name, "InfectionChance_SEX" ) == 0 ||
strcmp( name, "InfectionChance_CONTACT_HUMAN" ) == 0 ||
strcmp( name, "InfectionChance_CONTACT_CORPSE" ) == 0 ||
strcmp( name, "InfectionChance_WOUND_ANIMAL" ) == 0 ||
strcmp( name, "InfectionChance_WOUND_OPEN" ) == 0 ||
strcmp( name, "InfectionChance_WOUND_GUNSHOT" ) == 0 ||
strcmp( name, "InfectionChance_WOUND_AGI" ) == 0 ||
strcmp( name, "InfectionChance_WOUND_DEX" ) == 0 ||
strcmp( name, "InfectionChance_WOUND_STR" ) == 0 ||
strcmp( name, "InfectionChance_WOUND_WIS" ) == 0 ||
strcmp( name, "InfectionChance_WOUND_TRAUMATIC" ) == 0 ||
strcmp( name, "InfectionChance_BADFOOD" ) == 0 ||
strcmp( name, "InfectionChance_BADWATER" ) == 0 ||
strcmp( name, "fCanBeCured" ) == 0 ||
strcmp( name, "fReverseOnFull" ) == 0 ||
strcmp( name, "fCanReInfect" ) == 0 ||
@@ -180,80 +180,80 @@ diseaseEndElementHandle( void *userData, const XML_Char *name )
pData->curElement = ELEMENT;
pData->curItem.sInfectionPtsGainPerHour = (INT32)atol( pData->szCharData );
}
else if ( strcmp( name, "usInfectionChance_SWAMP" ) == 0 )
else if ( strcmp( name, "InfectionChance_SWAMP" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_SWAMP] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_SWAMP] = max(0.0f, min(100.0f, atof( pData->szCharData )));
}
else if ( strcmp( name, "usInfectionChance_TROPICS" ) == 0 )
else if ( strcmp( name, "InfectionChance_TROPICS" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_TROPICS] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_TROPICS] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_SEX" ) == 0 )
else if ( strcmp( name, "InfectionChance_SEX" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_SEX] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_SEX] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_CONTACT_HUMAN" ) == 0 )
else if ( strcmp( name, "InfectionChance_CONTACT_HUMAN" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_CONTACT_HUMAN] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_CONTACT_HUMAN] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_CONTACT_CORPSE" ) == 0 )
else if ( strcmp( name, "InfectionChance_CONTACT_CORPSE" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_CONTACT_CORPSE] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_CONTACT_CORPSE] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_WOUND_ANIMAL" ) == 0 )
else if ( strcmp( name, "InfectionChance_WOUND_ANIMAL" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_WOUND_ANIMAL] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_WOUND_ANIMAL] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_WOUND_OPEN" ) == 0 )
else if ( strcmp( name, "InfectionChance_WOUND_OPEN" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_WOUND_OPEN] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_WOUND_OPEN] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_WOUND_GUNSHOT" ) == 0 )
else if ( strcmp( name, "InfectionChance_WOUND_GUNSHOT" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_WOUND_GUNSHOT] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_WOUND_GUNSHOT] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_WOUND_AGI" ) == 0 )
else if ( strcmp( name, "InfectionChance_WOUND_AGI" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_WOUND_AGI] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_WOUND_AGI] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_WOUND_DEX" ) == 0 )
else if ( strcmp( name, "InfectionChance_WOUND_DEX" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_WOUND_DEX] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_WOUND_DEX] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_WOUND_STR" ) == 0 )
else if ( strcmp( name, "InfectionChance_WOUND_STR" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_WOUND_STR] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_WOUND_STR] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_WOUND_WIS" ) == 0 )
else if ( strcmp( name, "InfectionChance_WOUND_WIS" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_WOUND_WIS] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_WOUND_WIS] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_WOUND_TRAUMATIC" ) == 0 )
else if ( strcmp( name, "InfectionChance_WOUND_TRAUMATIC" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_TRAUMATIC] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_TRAUMATIC] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_BADFOOD" ) == 0 )
else if ( strcmp( name, "InfectionChance_BADFOOD" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_BADFOOD] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_BADFOOD] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "usInfectionChance_BADWATER" ) == 0 )
else if ( strcmp( name, "InfectionChance_BADWATER" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curItem.usInfectionChance[INFECTION_TYPE_BADWATER] = (UINT8)atol( pData->szCharData );
pData->curItem.dInfectionChance[INFECTION_TYPE_BADWATER] = max( 0.0f, min( 100.0f, atof( pData->szCharData ) ) );
}
else if ( strcmp( name, "fCanBeCured" ) == 0 )
{
@@ -436,21 +436,21 @@ BOOLEAN WriteDiseaseStats( )
FilePrintf( hFile, "\t\t<sInfectionPtsOutbreak>%d</sInfectionPtsOutbreak>\r\n", Disease[cnt].sInfectionPtsOutbreak );
FilePrintf( hFile, "\t\t<sInfectionPtsFull>%d</sInfectionPtsFull>\r\n", Disease[cnt].sInfectionPtsFull );
FilePrintf( hFile, "\t\t<sInfectionPtsGainPerHour>%d</sInfectionPtsGainPerHour>\r\n", Disease[cnt].sInfectionPtsGainPerHour );
FilePrintf( hFile, "\t\t<usInfectionChance_SWAMP>%d</usInfectionChance_SWAMP>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_SWAMP] );
FilePrintf( hFile, "\t\t<usInfectionChance_TROPICS>%d</usInfectionChance_TROPICS>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_TROPICS] );
FilePrintf( hFile, "\t\t<usInfectionChance_SEX>%d</usInfectionChance_SEX>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_SEX] );
FilePrintf( hFile, "\t\t<usInfectionChance_CONTACT_HUMAN>%d</usInfectionChance_CONTACT_HUMAN>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_CONTACT_HUMAN] );
FilePrintf( hFile, "\t\t<usInfectionChance_CONTACT_CORPSE>%d</usInfectionChance_CONTACT_CORPSE>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_CONTACT_CORPSE] );
FilePrintf( hFile, "\t\t<usInfectionChance_WOUND_ANIMAL>%d</usInfectionChance_WOUND_ANIMAL>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_WOUND_ANIMAL] );
FilePrintf( hFile, "\t\t<usInfectionChance_WOUND_OPEN>%d</usInfectionChance_WOUND_OPEN>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_WOUND_OPEN] );
FilePrintf( hFile, "\t\t<usInfectionChance_WOUND_GUNSHOT>%d</usInfectionChance_WOUND_GUNSHOT>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_WOUND_GUNSHOT] );
FilePrintf( hFile, "\t\t<usInfectionChance_WOUND_AGI>%d</usInfectionChance_WOUND_AGI>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_WOUND_AGI] );
FilePrintf( hFile, "\t\t<usInfectionChance_WOUND_DEX>%d</usInfectionChance_WOUND_DEX>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_WOUND_DEX] );
FilePrintf( hFile, "\t\t<usInfectionChance_WOUND_STR>%d</usInfectionChance_WOUND_STR>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_WOUND_STR] );
FilePrintf( hFile, "\t\t<usInfectionChance_WOUND_WIS>%d</usInfectionChance_WOUND_WIS>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_WOUND_WIS] );
FilePrintf( hFile, "\t\t<usInfectionChance_TRAUMATIC>%d</usInfectionChance_TRAUMATIC>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_TRAUMATIC] );
FilePrintf( hFile, "\t\t<usInfectionChance_BADFOOD>%d</usInfectionChance_BADFOOD>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_BADFOOD] );
FilePrintf( hFile, "\t\t<usInfectionChance_BADWATER>%d</usInfectionChance_BADWATER>\r\n", Disease[cnt].usInfectionChance[INFECTION_TYPE_BADWATER] );
FilePrintf( hFile, "\t\t<InfectionChance_SWAMP>%3.2f</InfectionChance_SWAMP>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_SWAMP] );
FilePrintf( hFile, "\t\t<InfectionChance_TROPICS>%3.2f</InfectionChance_TROPICS>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_TROPICS] );
FilePrintf( hFile, "\t\t<InfectionChance_SEX>%3.2f</InfectionChance_SEX>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_SEX] );
FilePrintf( hFile, "\t\t<InfectionChance_CONTACT_HUMAN>%3.2f</InfectionChance_CONTACT_HUMAN>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_CONTACT_HUMAN] );
FilePrintf( hFile, "\t\t<InfectionChance_CONTACT_CORPSE>%3.2f</InfectionChance_CONTACT_CORPSE>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_CONTACT_CORPSE] );
FilePrintf( hFile, "\t\t<InfectionChance_WOUND_ANIMAL>%3.2f</InfectionChance_WOUND_ANIMAL>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_WOUND_ANIMAL] );
FilePrintf( hFile, "\t\t<InfectionChance_WOUND_OPEN>%3.2f</InfectionChance_WOUND_OPEN>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_WOUND_OPEN] );
FilePrintf( hFile, "\t\t<InfectionChance_WOUND_GUNSHOT>%3.2f</InfectionChance_WOUND_GUNSHOT>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_WOUND_GUNSHOT] );
FilePrintf( hFile, "\t\t<InfectionChance_WOUND_AGI>%3.2f</InfectionChance_WOUND_AGI>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_WOUND_AGI] );
FilePrintf( hFile, "\t\t<InfectionChance_WOUND_DEX>%3.2f</InfectionChance_WOUND_DEX>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_WOUND_DEX] );
FilePrintf( hFile, "\t\t<InfectionChance_WOUND_STR>%3.2f</InfectionChance_WOUND_STR>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_WOUND_STR] );
FilePrintf( hFile, "\t\t<InfectionChance_WOUND_WIS>%3.2f</InfectionChance_WOUND_WIS>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_WOUND_WIS] );
FilePrintf( hFile, "\t\t<InfectionChance_TRAUMATIC>%3.2f</InfectionChance_TRAUMATIC>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_TRAUMATIC] );
FilePrintf( hFile, "\t\t<InfectionChance_BADFOOD>%3.2f</InfectionChance_BADFOOD>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_BADFOOD] );
FilePrintf( hFile, "\t\t<InfectionChance_BADWATER>%3.2f</InfectionChance_BADWATER>\r\n", Disease[cnt].dInfectionChance[INFECTION_TYPE_BADWATER] );
FilePrintf( hFile, "\t\t<fCanBeCured>%d</fCanBeCured>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_CANBECURED) ? 1 : 0 );
FilePrintf( hFile, "\t\t<fReverseOnFull>%d</fReverseOnFull>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_REVERSEONFULL) ? 1 : 0 );
FilePrintf( hFile, "\t\t<fCanReInfect>%d</fCanReInfect>\r\n", (Disease[cnt].usDiseaseProperties & DISEASE_PROPERTY_CANREINFECT) ? 1 : 0 );