mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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 )
|
||||
|
||||
@@ -1661,7 +1661,7 @@ UINT8 MoveAllInHelicopterToFootMovementGroup( INT8 bNewSquad )
|
||||
}
|
||||
|
||||
// go through list of everyone in helicopter
|
||||
for( iCounter = 0; iCounter < gNewVehicle[ pVehicleList[ iHelicopterVehicleId ].ubVehicleType ].iNewSeatingCapacities; iCounter++ )
|
||||
for( iCounter = 0; iCounter < gNewVehicle[ pVehicleList[ iHelicopterVehicleId ].ubVehicleType ].iNewSeatingCapacities; ++iCounter )
|
||||
{
|
||||
// get passenger
|
||||
pSoldier = pVehicleList[ iHelicopterVehicleId ].pPassengers[ iCounter ];
|
||||
|
||||
@@ -672,6 +672,10 @@ void HandleHeliDrop( )
|
||||
// OK, Check if we have anybody left to send!
|
||||
if ( gbCurDrop < bEndVal )
|
||||
{
|
||||
// Flugente: it is now possible to use airdrops with soldiers after they have arrived in Arulco. In that case, they might have an animation that breaks EVENT_InitNewSoldierAnim prematurely.
|
||||
// In the worst case, this can cause the game to be unable to finsih the airdrop. For that reason, we set all those soldier to the STANDING aniamtion.
|
||||
MercPtrs[ gusHeliSeats[ gbCurDrop ] ]->usAnimState = STANDING;
|
||||
|
||||
//sWorldX = CenterX( gsGridNoSweetSpot );
|
||||
//sWorldY = CenterY( gsGridNoSweetSpot );
|
||||
MercPtrs[ gusHeliSeats[ gbCurDrop ] ]->EVENT_InitNewSoldierAnim( HELIDROP, 0 , FALSE );
|
||||
|
||||
+5
-1
@@ -634,10 +634,14 @@ UINT32 MainGameScreenHandle(void)
|
||||
}
|
||||
#else
|
||||
InternalLocateGridNo( gGameExternalOptions.iInitialMercArrivalLocation, TRUE );
|
||||
#endif
|
||||
#endif
|
||||
// Flugente: we might have reloaded the game, so we are currently not dropping mercs out of a helicopter
|
||||
gfIngagedInDrop = FALSE;
|
||||
|
||||
// Start heli Run...
|
||||
StartHelicopterRun();
|
||||
|
||||
|
||||
// Update clock by one so that our DidGameJustStatrt() returns now false for things like LAPTOP, etc...
|
||||
SetGameTimeCompressionLevel( TIME_COMPRESS_X1 );
|
||||
//UpdateClock( 1 );
|
||||
|
||||
Reference in New Issue
Block a user