From 5cfda83df497195b0e8a2d3c511b24b4fdb4f13e Mon Sep 17 00:00:00 2001 From: silversurfer Date: Wed, 13 Aug 2014 15:54:54 +0000 Subject: [PATCH] Bugfix for compiler errors in VS2008 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7393 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Disease.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tactical/Disease.cpp b/Tactical/Disease.cpp index 68c5627d..ee3f81f2 100644 --- a/Tactical/Disease.cpp +++ b/Tactical/Disease.cpp @@ -18,6 +18,7 @@ #include "LaptopSave.h" #include "strategic.h" #include "DynamicDialogue.h" +#include //GLOBALS DISEASE Disease[NUM_DISEASES]; @@ -270,7 +271,7 @@ void HandleDisease() { // infection is also possible by human contact UINT32 usChance = Disease[0].usInfectionChance[INFECTION_TYPE_CONTACT_HUMAN]; - UINT16 max = sqrt( min( lefttoinfect - newinfected, pSectorInfo->usInfected ) ); + UINT16 max = sqrt( (FLOAT) min( lefttoinfect - newinfected, pSectorInfo->usInfected ) ); for ( UINT16 i = 0; i < max; ++i ) { if ( Chance( usChance ) ) @@ -283,7 +284,7 @@ void HandleDisease() // there is also the chance to be infected by bad food, sex, contact with animals etc. // For now, we assume this to be very rare events, so just add a small chance to be infected this way FLOAT populationpercentage = (FLOAT)(lefttoinfect - newinfected) / (FLOAT)(population); - FLOAT basechance = sqrt( min( lefttoinfect, pSectorInfo->usInfected + newinfected ) ) * 0.5f; + FLOAT basechance = sqrt( (FLOAT) min( lefttoinfect, pSectorInfo->usInfected + newinfected ) ) * 0.5f; FLOAT chance_sex = Disease[0].usInfectionChance[INFECTION_TYPE_SEX] * basechance * populationpercentage; FLOAT chance_corpse = 0;