mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- Fix: When retreating from tactical combat, militia gear was not dropped correctly
- Fix: Under certain circumstances, militia dropped gear twice in autoresolve git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5926 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -6133,11 +6133,11 @@ BOOLEAN HandleDefiniteUnloadingOfWorld( UINT8 ubUnloadCode )
|
||||
else if( ubUnloadCode == ABOUT_TO_TRASH_WORLD )
|
||||
{
|
||||
//if we arent loading a saved game
|
||||
if( !(gTacticalStatus.uiFlags & LOADING_SAVED_GAME ) )
|
||||
/*if( !(gTacticalStatus.uiFlags & LOADING_SAVED_GAME ) )
|
||||
{
|
||||
// Flugente: cause all militia whose equipment is from this sector to drop it
|
||||
TeamDropAll( MILITIA_TEAM );
|
||||
}
|
||||
}*/
|
||||
|
||||
//Save the current sectors open temp files to the disk
|
||||
if( !SaveCurrentSectorsInformationToTempItemFile() )
|
||||
@@ -6274,8 +6274,14 @@ BOOLEAN CheckAndHandleUnloadingOfCurrentWorld()
|
||||
// Added logic to prevent a crash when player mercs would retreat from a battle involving militia and enemies.
|
||||
// Without the return here, it would proceed to trash the world, and then when autoresolve would come up to
|
||||
// finish the tactical battle, it would fail to find the existing soldier information (because it was trashed).
|
||||
if( HandlePotentialBringUpAutoresolveToFinishBattle( sBattleSectorX, sBattleSectorY, sBattleSectorZ ) )
|
||||
if( HandlePotentialBringUpAutoresolveToFinishBattle( sBattleSectorX, sBattleSectorY, sBattleSectorZ ) )
|
||||
{
|
||||
// Flugente: cause all militia whose equipment is from this sector to drop it - otherwise it can get lost
|
||||
TeamDropAll( MILITIA_TEAM, TRUE );
|
||||
|
||||
// Save the current sectors Item list to a temporary file, if its not the first time in
|
||||
SaveCurrentSectorsInformationToTempItemFile();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
//end
|
||||
|
||||
Reference in New Issue
Block a user