mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- new feature: we can now equip militia with gear from sectors, see http://www.bears-pit.com/board/ubbthreads.php/topics/315664.html#Post315664 for more information
- increased the object flag size to UINT64, this breaks savegame compatibility git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5869 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -10219,3 +10219,34 @@ void HandleSurrenderOffer( SOLDIERTYPE* pSoldier )
|
||||
wcscpy( gzUserDefinedButton[3], TacticalStr[ PRISONER_TALK_STR ] );
|
||||
DoMessageBox( MSG_BOX_BASIC_MEDIUM_BUTTONS, TacticalStr[ PRISONER_OFFER_SURRENDER ], guiCurrentScreen, MSG_BOX_FLAG_GENERIC_FOUR_BUTTONS, PrisonerSurrenderMessageBoxCallBack, NULL );
|
||||
}
|
||||
|
||||
void TeamDropAll(UINT8 bTeam)
|
||||
{
|
||||
if ( bTeam > PLAYER_PLAN )
|
||||
return;
|
||||
|
||||
// not if there is a battle going on, or this team is hostile to us
|
||||
if ( (gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||
return;
|
||||
|
||||
if ( gTacticalStatus.Team[ gbPlayerNum ].bSide != gTacticalStatus.Team[ bTeam ].bSide )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE *pSoldier;
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_TESTVERSION, L"Team %d drops all items for inspection!", bTeam );
|
||||
#endif
|
||||
|
||||
UINT32 uiCnt = 0;
|
||||
UINT32 firstid = gTacticalStatus.Team[ bTeam ].bFirstID;
|
||||
UINT32 lastid = gTacticalStatus.Team[ bTeam ].bLastID;
|
||||
for ( uiCnt = firstid, pSoldier = MercPtrs[ uiCnt ]; uiCnt <= lastid; ++uiCnt, ++pSoldier)
|
||||
{
|
||||
// if soldier is in the current sector, drop all equipment (that has the TAKEN_BY_MILITIA-flag set)
|
||||
if( pSoldier->bActive && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) )
|
||||
{
|
||||
pSoldier->DropSectorEquipment();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user