Merged revision(s) 7018 from branches/ja2_source_official_2014:

- Fix: reloading while mercs are exiting the helicopter could lock the gamescreen.cpp
- Fix: helicopter airdrop could lock up if mercs were in a bad animation
- Fix: wrong battle report texts used

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7019 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-03-03 21:03:36 +00:00
parent baca53f566
commit b39954aee7
4 changed files with 14 additions and 6 deletions
+4 -4
View File
@@ -793,9 +793,9 @@ void RenderCampaignHistory_MostImportant()
UINT16 armysize = max(1, incident.usParticipants[CAMPAIGNHISTORY_SD_ENEMY_ADMIN] + incident.usParticipants[CAMPAIGNHISTORY_SD_ENEMY_ARMY] + incident.usParticipants[CAMPAIGNHISTORY_SD_ENEMY_ELITE] + incident.usParticipants[CAMPAIGNHISTORY_SD_ENEMY_TANK]);
// if rebels won...
if ( incident.usIncidentFlags & INCIDENT_WIN )
if ( incident.usIncidentFlags & INCIDENT_WIN && rebelsize )
{
FLOAT ratio = (FLOAT)(rebellosses / rebelsize);
FLOAT ratio = (FLOAT)(rebellosses) / (FLOAT)(rebelsize);
if ( ratio < 0.1 )
swprintf(sText, szCampaignHistoryResultString[TEXT_CAMPAIGNHISTORY_RESULT_ONESIDED_REBEL] );
else if ( ratio < 0.3 )
@@ -815,9 +815,9 @@ void RenderCampaignHistory_MostImportant()
else
swprintf(sText, szCampaignHistoryResultString[TEXT_CAMPAIGNHISTORY_RESULT_HARD_REBEL] );
}
else // army won...
else if ( armysize ) // army won...
{
FLOAT ratio = (FLOAT)(armylosses / armysize);
FLOAT ratio = (FLOAT)(armylosses) / (FLOAT)(armysize);
BOOLEAN armyhadmore = (armysize > rebelsize);
if ( ratio < 0.1 )