- Fix: fully repairing a gun did not always clean it

- Fix: need to sleep modifiers from food were applied wrong
- Fix: under certain circumstances, player mercs won an AI interrupt, leading a deadlock or - potentially - AI-controlled player mercs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5686 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-11-14 01:23:13 +00:00
parent 1a7e900df5
commit 51342b0669
3 changed files with 26 additions and 14 deletions
+10 -1
View File
@@ -1071,7 +1071,16 @@ void StartInterrupt( void )
AddTopMessage( COMPUTER_INTERRUPT_MESSAGE, Message[STR_INTERRUPT] );
if (pTempSoldier != NULL)
StartNPCAI( pTempSoldier );
{
// Flugente 12-11-13: I observed an isntance where the pTempSoldier was a player merc, leading to a deadlock here. The reason was that during an iinterrupot by a civilian, he somehow did not win
// instead the game used the last merc entry... which overflowed, and thus started at merc 0, which is always a player merc
// I am not sure if this is the best solution... however it seems to work for me.
// If anybody knows a better solution, feel free to do so
if ( pTempSoldier->bTeam != OUR_TEAM )
StartNPCAI( pTempSoldier );
else
EndInterrupt(TRUE);
}
}
if ( !gfHiddenInterrupt )