mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user