mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- New enemy role: display whether an enemy carries a key
For more, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=21774&goto=352502&#msg_352502 - If ENHANCED_CLOSE_COMBAT_SYSTEM is on, stealing multiple items from an enemy is possible if he is not on alert git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8523 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -6396,6 +6396,27 @@ BOOLEAN ShowSoldierRoleSymbol(SOLDIERTYPE* pSoldier)
|
|||||||
sYPos += 20;
|
sYPos += 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// do we carry a key?
|
||||||
|
for ( int ubLoop = 0; ubLoop < NUM_KEYS; ++ubLoop )
|
||||||
|
{
|
||||||
|
if ( SoldierHasKey( pSoldier, ubLoop ) )
|
||||||
|
{
|
||||||
|
// Add bars
|
||||||
|
iBack = RegisterBackgroundRect( BGND_FLAG_SINGLE, NULL, sXPos, sYPos, (INT16)( sXPos + 20 ), (INT16)( sYPos + 20 ) );
|
||||||
|
|
||||||
|
if ( iBack != -1 )
|
||||||
|
{
|
||||||
|
SetBackgroundRectFilled( iBack );
|
||||||
|
}
|
||||||
|
|
||||||
|
BltVideoObjectFromIndex( FRAME_BUFFER, guiENEMYROLES, 11, sXPos, sYPos, VO_BLT_TRANSSHADOW, NULL );
|
||||||
|
|
||||||
|
sYPos += 20;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3505,7 +3505,14 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo, BOOLEAN fStea
|
|||||||
// Do we have the chance to steal more than 1 item?
|
// Do we have the chance to steal more than 1 item?
|
||||||
// SANDRO - taking items from collapsed soldiers is treated differently
|
// SANDRO - taking items from collapsed soldiers is treated differently
|
||||||
// Flugente: if we are on the same team, allow guaranteed full access
|
// Flugente: if we are on the same team, allow guaranteed full access
|
||||||
if ( AllowedToStealFromTeamMate(pSoldier->ubID, pTargetSoldier->ubID) || ( fSoldierCollapsed || (!gGameExternalOptions.fEnhancedCloseCombatSystem && iDiceRoll < (iHitChance * 2 / 3))) && pSoldier->bTeam == gbPlayerNum )
|
// otherwise, if we are the player, we can steal multiple items if the other guy is collapsed, or we are succesful, and
|
||||||
|
// if using fEnhancedCloseCombatSystem, only allow this if the other guy is not alerted
|
||||||
|
if ( AllowedToStealFromTeamMate(pSoldier->ubID, pTargetSoldier->ubID) ||
|
||||||
|
pSoldier->bTeam == gbPlayerNum &&
|
||||||
|
( fSoldierCollapsed ||
|
||||||
|
( iDiceRoll < ( iHitChance * 2 / 3 ) &&
|
||||||
|
!gGameExternalOptions.fEnhancedCloseCombatSystem ||
|
||||||
|
pSoldier->aiData.bAlertStatus < STATUS_RED ) ) )
|
||||||
{
|
{
|
||||||
// first, charge extra Aps, because it's difficlut to pickup from other soldier
|
// first, charge extra Aps, because it's difficlut to pickup from other soldier
|
||||||
if (gGameExternalOptions.fEnhancedCloseCombatSystem)
|
if (gGameExternalOptions.fEnhancedCloseCombatSystem)
|
||||||
|
|||||||
Reference in New Issue
Block a user