- Fixed a few Visual Studio compiler warnings

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3129 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-07-22 21:35:50 +00:00
parent 3a2db52065
commit 5c9f9e71f9
9 changed files with 51 additions and 47 deletions
+5 -5
View File
@@ -564,11 +564,11 @@ BOOLEAN PrepareEnemyForSectorBattle()
// OJW - 20090403 - override max ai in co-op
if (is_networked && is_server && OVERRIDE_MAX_AI == 1)
{
float totalEnemies = pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites;
ubTotalAdmins = ((float)pSector->ubNumAdmins / totalEnemies) * mapMaximumNumberOfEnemies;
ubTotalTroops = ((float)pSector->ubNumTroops / totalEnemies) * mapMaximumNumberOfEnemies;
ubTotalElites = ((float)pSector->ubNumElites / totalEnemies) * mapMaximumNumberOfEnemies;
totalEnemies = ubTotalAdmins + ubTotalTroops + ubTotalElites;
float totalEnemies = (float)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites);
ubTotalAdmins = (unsigned int)(((float)pSector->ubNumAdmins / totalEnemies) * mapMaximumNumberOfEnemies);
ubTotalTroops = (unsigned int)(((float)pSector->ubNumTroops / totalEnemies) * mapMaximumNumberOfEnemies);
ubTotalElites = (unsigned int)(((float)pSector->ubNumElites / totalEnemies) * mapMaximumNumberOfEnemies);
totalEnemies = (float)(ubTotalAdmins + ubTotalTroops + ubTotalElites);
// take care of any rounding losses
while (totalEnemies < mapMaximumNumberOfEnemies)
+2 -1
View File
@@ -1358,7 +1358,6 @@ void EndLoadScreen( )
//Report the time it took to load the map. This is temporary until we are satisfied with the time
//it takes to load the map.
CHAR16 str[60];
FILE *fp;
UINT32 uiSeconds;
UINT32 uiHundreths;
UINT32 uiUnaccounted;
@@ -1381,6 +1380,8 @@ void EndLoadScreen( )
}
ScreenMsg( FONT_YELLOW, MSG_TESTVERSION, str );
#ifndef USE_VFS
FILE *fp;
if( fStartNewFile )
{ //start new file
fp = fopen( "TimeResults.txt", "w" );