Fix: no morale/loyalty penalty if a killed civilian was a member of a group

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7721 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-01-22 21:13:30 +00:00
parent 4c46054977
commit 4ba64556bf
+4 -7
View File
@@ -710,15 +710,12 @@ void HandleMurderOfCivilian( SOLDIERTYPE *pSoldier, BOOLEAN fIntentional )
}
}
// Flugente: if a civilian's group has Loyalty set to 0, there will be no morale penalty/loyalty change if he is killed. Pretty odd, but at least not as bugged as it was before.
// if civilian belongs to a civilian group
if ( pSoldier->ubCivilianGroup != NON_CIV_GROUP )
if ( pSoldier->ubCivilianGroup != NON_CIV_GROUP && pSoldier->ubCivilianGroup < NUM_CIV_GROUPS )
{
//New Group by Jazz
for( iCounter2 = REBEL_CIV_GROUP; iCounter2 < NUM_CIV_GROUPS; iCounter2++ )
{
if (zCivGroupName[iCounter2].Loyalty == FALSE)
return;
}
if ( !zCivGroupName[pSoldier->ubCivilianGroup].Loyalty )
return;
}
/*