mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New feature: Voicesets are now independent fom profile slots. Voiceset is set in MercProfiles.xml with <usVoiceIndex>. IMP voices are defined in IMPVoices.xml.
This feature is savegame compatible. Requires GameDir >= r2357 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8364 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1548,6 +1548,8 @@ void MERCPROFILESTRUCT::initialize( )
|
||||
|
||||
memset( &usDynamicOpinionFlagmask, 0, sizeof(usDynamicOpinionFlagmask) );
|
||||
memset( &sDynamicOpinionLongTerm, 0, sizeof(sDynamicOpinionLongTerm) );
|
||||
|
||||
memset( &usVoiceIndex, 0, sizeof(UINT32) );
|
||||
}
|
||||
|
||||
// Initialize the soldier.
|
||||
@@ -10749,11 +10751,14 @@ BOOLEAN SOLDIERTYPE::InternalDoMercBattleSound( UINT8 ubBattleSoundID, INT8 bSpe
|
||||
// OK, build file and play!
|
||||
if ( pSoldier->ubProfile != NO_PROFILE )
|
||||
{
|
||||
sprintf( zFilename, "BATTLESNDS\\%03d_%s.ogg", pSoldier->ubProfile, gBattleSndsData[ubSoundID].zName );
|
||||
// Flugente: For the voice set itself, use this number
|
||||
UINT32 usVoiceSet = gMercProfiles[pSoldier->ubProfile].usVoiceIndex;
|
||||
|
||||
sprintf( zFilename, "BATTLESNDS\\%03d_%s.ogg", usVoiceSet, gBattleSndsData[ubSoundID].zName );
|
||||
|
||||
if ( !FileExists( zFilename ) )
|
||||
{
|
||||
sprintf( zFilename, "BATTLESNDS\\%03d_%s.wav", pSoldier->ubProfile, gBattleSndsData[ubSoundID].zName );
|
||||
sprintf( zFilename, "BATTLESNDS\\%03d_%s.wav", usVoiceSet, gBattleSndsData[ubSoundID].zName );
|
||||
}
|
||||
|
||||
if ( !FileExists( zFilename ) )
|
||||
|
||||
Reference in New Issue
Block a user