- random items can also be results of merges and item transformations

- removed a few instances of incorrect random item spawning

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5598 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-10-01 20:42:55 +00:00
parent 7ef76bbe35
commit fc49b33398
3 changed files with 38 additions and 4 deletions
+8
View File
@@ -1042,6 +1042,10 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC
if ( GetItemFromRandomItem(usGunIndex, &newitemfromrandom) )
usGunIndex = newitemfromrandom;
// if item is still radnom, use default gun -> GLOCK 17
if ( Item[usGunIndex].randomitem > 0 )
usGunIndex = GLOCK_17;
//WarmSteel - Removed the attachment check here. why check twice anyway?
//Now, we have chosen all of the correct items. Now, we will assign them into the slots.
//Because we are dealing with enemies, automatically give them full ammo in their weapon.
@@ -3471,6 +3475,10 @@ UINT16 PickARandomItem(UINT8 typeIndex, UINT8 maxCoolness, BOOLEAN getMatchingCo
pickItem = TRUE;
}
}
// Flugente: if item is still random, don't pick it
if ( Item[usItem].randomitem > 0 )
pickItem = FALSE;
}