Fixed assertion error caused when switching from strategic to tactical with a dead merc in the current team.

Fixed a bug where hired RPCs would not get items stored in their gunsling or knife pockets.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2359 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2008-09-23 23:14:49 +00:00
parent 52a28a8268
commit 6f2af55cba
2 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -1016,7 +1016,10 @@ SOLDIERTYPE *ChangeSoldierTeam( SOLDIERTYPE *pSoldier, UINT8 ubTeam )
{
pNewSoldier->inv[cnt] = pSoldier->inv[cnt];
}
// Next, try to autoplace everything else
// Next, direct copy of the gunsling and knife pockets
pNewSoldier->inv[GUNSLINGPOCKPOS] = pSoldier->inv[GUNSLINGPOCKPOS];
pNewSoldier->inv[KNIFEPOCKPOS] = pSoldier->inv[KNIFEPOCKPOS];
// Then, try to autoplace everything else
for(cnt = BIGPOCKSTART; cnt < pNewSoldier->inv.size(); cnt++ )
{
if(pSoldier->inv[cnt].exists() == true)