mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Bugfix for JaggZilla Bug #635
- NPCs that turn neutral cannot end a battle for an entire sector anymore if there is other enemies around. - Enemies that bled to death won't stop the code anymore to grant us victory. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6476 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -186,6 +186,7 @@ BOOLEAN InternalInitiateConversation( SOLDIERTYPE *pDestSoldier, SOLDIERTYPE *pS
|
||||
extern void EndGameMessageBoxCallBack( UINT8 ubExitValue );
|
||||
extern INT32 FindNearestOpenableNonDoor( INT32 sStartGridNo );
|
||||
extern void RecalculateOppCntsDueToBecomingNeutral( SOLDIERTYPE * pSoldier );
|
||||
extern UINT8 NumCapableEnemyInSector( );
|
||||
|
||||
#ifdef JA2UB
|
||||
//JA25 UB
|
||||
@@ -3016,7 +3017,10 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
||||
break;
|
||||
|
||||
case NPC_ACTION_END_COMBAT:
|
||||
ExitCombatMode();
|
||||
// silversurfer: Bugfix for JaggZilla Bug #635
|
||||
// We can't end combat just because this one guy is now not hostile anymore. What about the rest of the sector?
|
||||
if ( NumCapableEnemyInSector() == 0 )
|
||||
ExitCombatMode();
|
||||
break;
|
||||
|
||||
case NPC_ACTION_BECOME_FRIENDLY_END_COMBAT:
|
||||
@@ -3029,7 +3033,10 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
||||
RecalculateOppCntsDueToBecomingNeutral( pSoldier );
|
||||
if ( gTacticalStatus.bNumFoughtInBattle[ CIV_TEAM ] == 0 )
|
||||
{
|
||||
gTacticalStatus.fEnemyInSector = FALSE;
|
||||
// silversurfer: Bugfix for JaggZilla Bug #635
|
||||
// Function CheckForEndOfBattle() will set this IF the sector is really free of enemies.
|
||||
//gTacticalStatus.fEnemyInSector = FALSE;
|
||||
CheckForEndOfBattle( FALSE );
|
||||
}
|
||||
if ( !gTacticalStatus.fEnemyInSector )
|
||||
{
|
||||
|
||||
@@ -6995,7 +6995,8 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
||||
// OK, KILL any enemies that are incompacitated
|
||||
if ( KillIncompacitatedEnemyInSector( ) )
|
||||
{
|
||||
return( FALSE );
|
||||
// silversurfer: Why this? The rest of our enemies just bled to death so go on with the code!
|
||||
//return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user