FindSoldierByProfileID fix: check last soldier in player team

RenderOverheadOverlays fix: last soldier in player team
StartInterrupt fix: all interrupts in original interrupt system start as hidden and revealed later if soldier decides something
StartInterrupt fix: don't show hidden interrupt
DeductPoints, ResolvePendingInterrupt, StartInterrupt: MAX_NUM_SOLDIERS fix
SoldierCollapse: replace chosen one if soldier is collapsed

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8259 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2016-06-25 09:44:25 +00:00
parent fea2a0d12b
commit b1eb11941a
5 changed files with 38 additions and 22 deletions
+8 -3
View File
@@ -491,8 +491,10 @@ void RandomStats()
pProfile->bExpLevel = RandomAbsoluteRange( pProfile->bExpLevel, 1, 10, Exp, Type );
if ( gRandomStatsValue[cnt].RandomLife == TRUE )
{
pProfile->bLifeMax = RandomAbsoluteRange( pProfile->bLifeMax, 1, 100, Stats, Type );
pProfile->bLife = pProfile->bLifeMax;
}
if ( gRandomStatsValue[cnt].RandomAgility == TRUE )
pProfile->bAgility = RandomAbsoluteRange( pProfile->bAgility, 1, 100, Stats, Type );
@@ -1647,17 +1649,20 @@ SOLDIERTYPE * FindSoldierByProfileID( UINT8 ubProfileID, BOOLEAN fPlayerMercsOnl
UINT8 ubLoop, ubLoopLimit;
SOLDIERTYPE * pSoldier;
// sevenfm: fix for last soldier in player team
if (fPlayerMercsOnly)
{
ubLoopLimit = gTacticalStatus.Team[0].bLastID;
ubLoopLimit = gTacticalStatus.Team[0].bLastID + 1;
}
else
{
ubLoopLimit = MAX_NUM_SOLDIERS;
}
for (ubLoop = 0, pSoldier = MercPtrs[0]; ubLoop < ubLoopLimit; ubLoop++, pSoldier++)
for (ubLoop = 0; ubLoop < ubLoopLimit; ubLoop++)
{
pSoldier = MercPtrs[ubLoop];
if (pSoldier->bActive && pSoldier->ubProfile == ubProfileID)
{
return( pSoldier );
@@ -2395,7 +2400,7 @@ SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier )
pNewProfile->records.usExpDetonated = gMercProfiles[ ubSrcProfile ].records.usExpDetonated;
pNewProfile->records.usItemsRepaired = gMercProfiles[ ubSrcProfile ].records.usItemsRepaired;
pNewProfile->records.usItemsCombined = gMercProfiles[ ubSrcProfile ].records.usItemsCombined;
pNewProfile->records.usItemsCombined = gMercProfiles[ ubSrcProfile ].records.usItemsStolen;
pNewProfile->records.usItemsStolen = gMercProfiles[ ubSrcProfile ].records.usItemsStolen;
pNewProfile->records.usMercsBandaged = gMercProfiles[ ubSrcProfile ].records.usMercsBandaged;
pNewProfile->records.usSurgeriesMade = gMercProfiles[ ubSrcProfile ].records.usSurgeriesMade;
pNewProfile->records.usNPCsDiscovered = gMercProfiles[ ubSrcProfile ].records.usNPCsDiscovered;