mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Fix for PercentEliteBonus from DifficultySettings.xml not applying onto enemy armies with both admins and regular troops correctly.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9333 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1242,9 +1242,17 @@ void InitStrategicAI()
|
|||||||
{
|
{
|
||||||
if ( i != OMERTA_WELCOME_WAGON )
|
if ( i != OMERTA_WELCOME_WAGON )
|
||||||
{
|
{
|
||||||
gArmyComp[ i ].bElitePercentage = min(100,gArmyComp[ i ].bElitePercentage + iPercentElitesBonus);
|
gArmyComp[i].bElitePercentage = min(100, gArmyComp[i].bElitePercentage + iPercentElitesBonus);
|
||||||
gArmyComp[ i ].bTroopPercentage = max(0,gArmyComp[ i ].bTroopPercentage - iPercentElitesBonus);
|
if (gArmyComp[i].bTroopPercentage >= iPercentElitesBonus)
|
||||||
gArmyComp[ i ].bAdminPercentage = max(0,gArmyComp[ i ].bAdminPercentage - iPercentElitesBonus);
|
{
|
||||||
|
gArmyComp[i].bTroopPercentage = gArmyComp[i].bTroopPercentage - iPercentElitesBonus;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
INT8 diff = iPercentElitesBonus - gArmyComp[i].bTroopPercentage;
|
||||||
|
gArmyComp[i].bTroopPercentage = 0;
|
||||||
|
gArmyComp[i].bAdminPercentage = max(0, gArmyComp[i].bAdminPercentage - diff);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user