mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- New Feature: enemies roles allows the AI to use medics and officers, and the player can now identify high-value targets among the enemy.
Requires GameDir >= r1987. - If an enemy is spawned with a radio set, he is more likely to become a radio operator. - It is now possible to mount a gun on prone allies if you are facing them on the right angle. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7072 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -10619,3 +10619,28 @@ INT8 CalcEffectiveShockLevel( SOLDIERTYPE * pSoldier )
|
||||
}
|
||||
return bShockForCower;
|
||||
}
|
||||
|
||||
// Flugente: count number of enemy officers
|
||||
UINT8 HighestEnemyOfficersInSector( BOOL& aType )
|
||||
{
|
||||
SOLDIERTYPE* pSoldier;
|
||||
INT32 cnt = 0;
|
||||
UINT8 num = 0;
|
||||
UINT8 type = OFFICER_NONE;
|
||||
|
||||
for ( cnt = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID, pSoldier = MercPtrs[cnt]; cnt < gTacticalStatus.Team[ ENEMY_TEAM ].bLastID; pSoldier++, ++cnt )
|
||||
{
|
||||
if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife > 0 )
|
||||
{
|
||||
if ( pSoldier->bSoldierFlagMask & SOLDIER_ENEMY_OFFICER )
|
||||
{
|
||||
// officers with double squadleader trait are captains, otherwise lieutnant
|
||||
aType = max( aType, NUM_SKILL_TRAITS( pSoldier, SQUADLEADER_NT) );
|
||||
|
||||
++num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return num;
|
||||
}
|
||||
Reference in New Issue
Block a user