- Fix: disease notification should not be visible to the player

- Fix: disease infection happened even though disease feaure was off
- Disease Improvement: infection chance by corpse is now affected by age of corpse

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7486 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-09-04 19:55:56 +00:00
parent d3100e3c4e
commit 5ad522e4a7
5 changed files with 33 additions and 5 deletions
+12
View File
@@ -3105,3 +3105,15 @@ BOOLEAN CorpseOkToDress( ROTTING_CORPSE* pCorpse )
return FALSE;
}
// Flugente: how rotten is this corpse? values from 0 to 1, 1 as soon as it is rotting
FLOAT GetCorpseRotFactor( ROTTING_CORPSE* pCorpse )
{
if ( !pCorpse )
return 0.0f;
if ( pCorpse->def.ubType == ROTTING_STAGE2 )
return 1.0f;
return (GetWorldTotalMin( ) - pCorpse->def.uiTimeOfDeath) / DELAY_UNTIL_ROTTING;
}