mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: crash after heli landing in UB (by Asdow)
Fix: unnecessary town initialization in UB (by Asdow) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8816 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -463,7 +463,7 @@ void InitStrategicLayer( void )
|
||||
|
||||
#ifdef JA2UB
|
||||
////if ( gGameUBOptions.InitTownLoyalty_UB == TRUE )
|
||||
InitTownLoyalty(); //Ja25 no loyalty
|
||||
//InitTownLoyalty(); //Ja25 no loyalty
|
||||
#else
|
||||
// init town loyalty
|
||||
InitTownLoyalty(); //Ja25 no loyalty
|
||||
|
||||
@@ -1396,34 +1396,38 @@ void HandleDialogue( )
|
||||
// grab soldier ptr from profile ID
|
||||
pSoldier = FindSoldierByProfileID( (UINT8)QItem->uiSpecialEventData, FALSE );
|
||||
|
||||
// Now, wake these sluts up and have them say quote...
|
||||
pSoldier->fIgnoreGetupFromCollapseCheck = FALSE;
|
||||
|
||||
//Get the soldier up
|
||||
pSoldier->bCollapsed = FALSE;
|
||||
pSoldier->ChangeSoldierStance( ANIM_STAND );
|
||||
|
||||
//if the soldier is Jerry
|
||||
if( FindSoldierByProfileID( JERRY_MILO_UB, FALSE ) == pSoldier ) //JERRY
|
||||
// FindSoldier was returning a lot of nullptrs which would crash the game very quickly after Jerry gets up. This check is here to circumvent that.
|
||||
if (pSoldier != nullptr)
|
||||
{
|
||||
//Play the sound of the Antena breaking
|
||||
PlayJA2SampleFromFile( "SOUNDS\\Metal Antenna Crunch.wav", RATE_11025, HIGHVOLUME, 1, MIDDLE );
|
||||
}
|
||||
// Now, wake these sluts up and have them say quote...
|
||||
pSoldier->fIgnoreGetupFromCollapseCheck = FALSE;
|
||||
|
||||
//Turn off the flag saying we are doing the initial heli crash
|
||||
gfFirstTimeInGameHeliCrash = FALSE;
|
||||
//Get the soldier up
|
||||
pSoldier->bCollapsed = FALSE;
|
||||
pSoldier->ChangeSoldierStance( ANIM_STAND );
|
||||
|
||||
//if all the mercs are done their talk
|
||||
if( AreAllTheMercsFinishedSayingThereInitialHeliCrashQuotes() )
|
||||
{
|
||||
//Trigger Jerry Milo's script record 10 ( call action 301 )
|
||||
//AA
|
||||
//if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
if ( gGameUBOptions.JerryQuotes == TRUE )
|
||||
DelayedMercQuote( JERRY_MILO_UB , 0xffff, 4 ); //JERRY
|
||||
//if the soldier is Jerry
|
||||
if (FindSoldierByProfileID( JERRY_MILO_UB, FALSE ) == pSoldier) //JERRY
|
||||
{
|
||||
//Play the sound of the Antena breaking
|
||||
PlayJA2SampleFromFile( "SOUNDS\\Metal Antenna Crunch.wav", RATE_11025, HIGHVOLUME, 1, MIDDLE );
|
||||
}
|
||||
|
||||
//End the ui Lock
|
||||
guiPendingOverrideEvent = LU_ENDUILOCK;
|
||||
//Turn off the flag saying we are doing the initial heli crash
|
||||
gfFirstTimeInGameHeliCrash = FALSE;
|
||||
|
||||
//if all the mercs are done their talk
|
||||
if (AreAllTheMercsFinishedSayingThereInitialHeliCrashQuotes())
|
||||
{
|
||||
//Trigger Jerry Milo's script record 10 ( call action 301 )
|
||||
//AA
|
||||
//if ( gGameUBOptions.InGameHeliCrash == TRUE )
|
||||
if (gGameUBOptions.JerryQuotes == TRUE)
|
||||
DelayedMercQuote( JERRY_MILO_UB, 0xffff, 4 ); //JERRY
|
||||
|
||||
//End the ui Lock
|
||||
guiPendingOverrideEvent = LU_ENDUILOCK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user