mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
New Trait: Snitch (Trait 22) (by anv)
Every midnight snitches will give you a report about their collegues' opinions. Information includes: - merc whining about high death rate, - merc whining about player reputation, - merc whining about his low morale, - merc whining about some other merc (unliked, not only hated), - merc planning to quit (leave without renewing contract, only AIM mercs) next day, - merc whining about player inactivity, - merc whining about player owing them money (you can only owe money to MERC mercs). List of snitches (trait 22) Beth Bud Buzz Carp Ears Gary Hurl Lance Leon Weasel see: http://www.bears-pit.com/board/ubbthreads.php/topics/329412/Snitches_+_Externalised_morale.html git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6723 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+63
-1
@@ -1345,7 +1345,17 @@ void HandleTalkingAutoFace( INT32 iFaceIndex )
|
||||
// Check if we have finished, set some flags for the final delay down if so!
|
||||
if ( !SoundIsPlaying( pFace->uiSoundID ) && !pFace->fFinishTalking )
|
||||
{
|
||||
SetupFinalTalkingDelay( pFace );
|
||||
if( subsequentsounds.ubMaxSndCounter != 0 && subsequentsounds.ubSndCounter < subsequentsounds.ubMaxSndCounter )
|
||||
{
|
||||
|
||||
pFace->uiSoundID = PlayJA2GapSample( subsequentsounds.zSoundFiles[subsequentsounds.ubSndCounter], RATE_11025, HIGHVOLUME, 1, MIDDLEPAN, &(pFace->GapList ) );
|
||||
subsequentsounds.ubSndCounter++;
|
||||
}
|
||||
else
|
||||
{
|
||||
subsequentsounds.ubMaxSndCounter = 0;
|
||||
SetupFinalTalkingDelay( pFace );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3003,6 +3013,58 @@ BOOLEAN SetFaceTalking( INT32 iFaceIndex, CHAR8 *zSoundFile, STR16 zTextString,
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOLEAN SetFaceTalkingMultipleSounds( INT32 iFaceIndex, CHAR8 zSoundFiles[][64], UINT8 ubMaxSoundsCount,
|
||||
STR16 zTextString, UINT32 usRate, UINT32 ubVolume, UINT32 ubLoops, UINT32 uiPan )
|
||||
{
|
||||
CHAR8 zExistingSoundFiles[10][64];
|
||||
UINT8 ubSoundsCount = 0;
|
||||
|
||||
FACETYPE *pFace;
|
||||
|
||||
pFace = &gFacesData[ iFaceIndex ];
|
||||
|
||||
// Set face to talking
|
||||
pFace->fTalking = TRUE;
|
||||
pFace->fAnimatingTalking = TRUE;
|
||||
pFace->fFinishTalking = FALSE;
|
||||
|
||||
|
||||
// only play sounds that do exist
|
||||
for( UINT8 i = 0; i < ubMaxSoundsCount; i++ )
|
||||
{
|
||||
if( FileExists(zSoundFiles[i]) )
|
||||
{
|
||||
strcpy(zExistingSoundFiles[ubSoundsCount], zSoundFiles[i]);
|
||||
ubSoundsCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// Play sample
|
||||
if( gGameSettings.fOptions[ TOPTION_SPEECH ] )
|
||||
pFace->uiSoundID = PlayJA2MultipleGapSample( zExistingSoundFiles, ubSoundsCount, RATE_11025, HIGHVOLUME, 1, MIDDLEPAN, &(pFace->GapList ) );
|
||||
else
|
||||
pFace->uiSoundID = SOUND_ERROR;
|
||||
|
||||
if ( pFace->uiSoundID != SOUND_ERROR )
|
||||
{
|
||||
pFace->fValidSpeech = TRUE;
|
||||
|
||||
pFace->uiTalkingFromVeryBeginningTimer = GetJA2Clock( );
|
||||
}
|
||||
else
|
||||
{
|
||||
pFace->fValidSpeech = FALSE;
|
||||
|
||||
// Set delay based on sound...
|
||||
pFace->uiTalkingTimer = pFace->uiTalkingFromVeryBeginningTimer = GetJA2Clock( );
|
||||
|
||||
pFace->uiTalkingDuration = FindDelayForString( zTextString );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN ExternSetFaceTalking( INT32 iFaceIndex, UINT32 uiSoundID )
|
||||
{
|
||||
FACETYPE *pFace;
|
||||
|
||||
Reference in New Issue
Block a user