mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Updated Enemy taunts feature (by anv)
- ridiculous amount of tags: attack, hit, miss, kill, head pop, blinded, type of attack, is target a zombie...
- ripostes to merc quotes,
- taunts can now make noise,
- bumped up amount of taunts to respectable 733, mostly thanks to your contributions guys,
- accidently squashed bug with incorrect noise notifications ("hears scream" instead of "hears explosion" etc.)
Ripostes
At the moment enemies can react to quotes "enemy detected", "1st enemy detected", "multiple enemies detected", "bullet flew by", "under heavy fire", as these are most likely to be used in combat. In the first three cases, riposting enemy will be chosen randomly from all enemy witnesses, latter two - last enemy to attack this merc will taunt.
Enemy's riposte will come as soon as merc quote is finished.
Noisy taunts
Taunts can be handled like other noises in game - shots, explosions, etc., meaning:
- they will be displayed only if someone from our team is close enough to hear them,
- they can be heard even if you don't see enemy (with twist of his name changed to "unknown voice". Yay.)
- volume of taunts is configurable in .ini.
see: http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/327830/4.html
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6628 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2683,6 +2683,48 @@ void HandleDialogueEnd( FACETYPE *pFace )
|
||||
fTextBoxMouseRegionCreated = FALSE;
|
||||
}
|
||||
|
||||
// anv: after merc finishes his quote, we want enemy to answer
|
||||
if ( gbUIHandlerID == DIALOGUE_TACTICAL_UI )
|
||||
{
|
||||
SOLDIERTYPE *pSoldier = FindSoldierByProfileID( gTacticalStatus.ubLastQuoteProfileNUm, FALSE );
|
||||
UINT8 ubSeenEnemies[ MAX_NUM_SOLDIERS ];
|
||||
UINT8 ubSeenEnemiesCnt = 0;
|
||||
switch( gTacticalStatus.ubLastQuoteSaid )
|
||||
{
|
||||
case QUOTE_SEE_ENEMY:
|
||||
case QUOTE_SEE_ENEMY_VARIATION:
|
||||
case QUOTE_IN_TROUBLE_SLASH_IN_BATTLE:
|
||||
// select random enemy, who we see, who sees us and isn't deaf
|
||||
for(UINT8 cnt = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID; cnt < gTacticalStatus.Team[ ENEMY_TEAM ].bLastID ; cnt++ )
|
||||
{
|
||||
if( MercPtrs[cnt] != NULL && MercPtrs[cnt]->aiData.bOppList[pSoldier->ubID] == SEEN_CURRENTLY
|
||||
&& MercPtrs[pSoldier->ubID]->aiData.bOppList[cnt] == SEEN_CURRENTLY && !( MercPtrs[cnt]->bDeafenedCounter > 0 ) )
|
||||
{
|
||||
ubSeenEnemies[ubSeenEnemiesCnt] = cnt;
|
||||
ubSeenEnemiesCnt++;
|
||||
}
|
||||
}
|
||||
if( ubSeenEnemiesCnt > 0 )
|
||||
{
|
||||
if( gTacticalStatus.ubLastQuoteSaid == QUOTE_SEE_ENEMY )
|
||||
PossiblyStartEnemyTaunt( MercPtrs[ubSeenEnemies[ Random(ubSeenEnemiesCnt) ]], TAUNT_R_ENEMY_DETECTED, FindSoldierByProfileID( gTacticalStatus.ubLastQuoteProfileNUm, FALSE ) );
|
||||
else if( gTacticalStatus.ubLastQuoteSaid == QUOTE_SEE_ENEMY_VARIATION )
|
||||
PossiblyStartEnemyTaunt( MercPtrs[ubSeenEnemies[ Random(ubSeenEnemiesCnt) ]], TAUNT_R_1ST_ENEMY_DETECTED, FindSoldierByProfileID( gTacticalStatus.ubLastQuoteProfileNUm, FALSE ) );
|
||||
else if( gTacticalStatus.ubLastQuoteSaid == QUOTE_IN_TROUBLE_SLASH_IN_BATTLE )
|
||||
PossiblyStartEnemyTaunt( MercPtrs[ubSeenEnemies[ Random(ubSeenEnemiesCnt) ]], TAUNT_R_MULTIPLE_ENEMIES, FindSoldierByProfileID( gTacticalStatus.ubLastQuoteProfileNUm, FALSE ) );
|
||||
}
|
||||
break;
|
||||
case QUOTE_CLOSE_CALL:
|
||||
PossiblyStartEnemyTaunt( MercPtrs[pSoldier->ubPreviousAttackerID], TAUNT_R_BULLET_FLEW_BY, FindSoldierByProfileID( gTacticalStatus.ubLastQuoteProfileNUm, FALSE ) );
|
||||
break;
|
||||
case QUOTE_UNDER_HEAVY_FIRE:
|
||||
PossiblyStartEnemyTaunt( MercPtrs[pSoldier->ubPreviousAttackerID], TAUNT_R_UNDER_HEAVY_FIRE, FindSoldierByProfileID( gTacticalStatus.ubLastQuoteProfileNUm, FALSE ) );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DIALOGUE_NPC_UI:
|
||||
|
||||
Reference in New Issue
Block a user