Corrected a graphic rendering issue with attachment alignment on the strategic screen.

Corrected a problem with IMP hiring that caused an assertion error when trying to use the last female IMP profile ID.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2292 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2008-08-05 18:22:22 +00:00
parent 768ad6ea74
commit 0b25d91e0e
4 changed files with 17 additions and 12 deletions
+6 -1
View File
@@ -1031,7 +1031,12 @@ INT32 CountEmptyIMPSlots( INT8 iSex )
INT32 GetSexOfIMP(INT32 iIMPId)
{
INT32 ui;
for (ui = 0; ui < CountIMPSlots(); ++ui)
//CHRISL: There is "padding" build into the iaIMPSLots array. The index after the last male and female entry are both set
// to -1. The following loop, however, does not take this into consideration. A female IMP using iIMPId 56 will never
// get setup correctly, resulting in the "Assert(FALSE)" the occurs after the loop. Since the array is initially setup
// by adding 2 to the male/female totals, do the same here.
//for (ui = 0; ui < CountIMPSlots(); ++ui)
for (ui = 0; ui < CountIMPSlots()+2; ++ui)
{
if (gGameExternalOptions.iaIMPSlots[ui] == iIMPId)
{