Fix: NPCs with profile > 170 have missing approach values, making it imposssible to fulfil opinion checks

Fore more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=353657&#msg_353657

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8566 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-06-02 01:23:59 +00:00
parent 2d31145d06
commit 87bd1118d0
+18
View File
@@ -820,6 +820,24 @@ BOOLEAN LoadMercProfiles(void)
memset( &gMercProfiles[uiLoop].usDynamicOpinionFlagmask, 0, sizeof(gMercProfiles[uiLoop].usDynamicOpinionFlagmask) );
memset( &gMercProfiles[uiLoop].sDynamicOpinionLongTerm, 0, sizeof(gMercProfiles[uiLoop].sDynamicOpinionLongTerm) );
// Flugente: as this data is not in the xml, we set dummy values
if ( gMercProfiles[uiLoop].ubApproachVal[0] == 0 &&
gMercProfiles[uiLoop].ubApproachVal[1] == 0 &&
gMercProfiles[uiLoop].ubApproachVal[2] == 0 &&
gMercProfiles[uiLoop].ubApproachVal[3] == 0 )
{
for ( int i = 0; i < 4; ++i )
{
// with ubApproachVal of 50 and ubApproachMod of 100, approach value towards an NPC will be the merc's effective leadership, which seems like a reasonable default
gMercProfiles[uiLoop].ubApproachVal[i] = 50;
for ( int j = 0; j < 3; ++j )
{
gMercProfiles[uiLoop].ubApproachMod[j][i] = 100;
}
}
}
}
// WANNE - BMP: DONE!