mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +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:
@@ -10291,15 +10291,16 @@ void HandleSurrenderOffer( SOLDIERTYPE* pSoldier )
|
||||
DoMessageBox( MSG_BOX_BASIC_MEDIUM_BUTTONS, TacticalStr[ PRISONER_OFFER_SURRENDER ], guiCurrentScreen, MSG_BOX_FLAG_GENERIC_FOUR_BUTTONS, PrisonerSurrenderMessageBoxCallBack, NULL );
|
||||
}
|
||||
|
||||
void TeamDropAll(UINT8 bTeam)
|
||||
void TeamDropAll(UINT8 bTeam, BOOLEAN fForce)
|
||||
{
|
||||
if ( bTeam > PLAYER_PLAN )
|
||||
return;
|
||||
|
||||
// not if there is a battle going on, or this team is hostile to us
|
||||
if ( (gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||
// not if there is a battle going on
|
||||
if ( (gTacticalStatus.uiFlags & INCOMBAT ) && !fForce )
|
||||
return;
|
||||
|
||||
// not if this team is hostile to us
|
||||
if ( gTacticalStatus.Team[ gbPlayerNum ].bSide != gTacticalStatus.Team[ bTeam ].bSide )
|
||||
return;
|
||||
|
||||
|
||||
+2
-1
@@ -408,6 +408,7 @@ STR16 GetNewTraitStr(UINT8 aTrait); // Flugente: deal with the insane new trait
|
||||
|
||||
void HandleSurrenderOffer( SOLDIERTYPE* pSoldier ); // Flugente: offer the enemy the chance to surrender
|
||||
|
||||
void TeamDropAll(UINT8 bTeam);
|
||||
// setting fForce to TRUE allows dropping of gear in combat (used in auto-resolve instances)
|
||||
void TeamDropAll(UINT8 bTeam, BOOLEAN fForce = FALSE);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user