diff --git a/Tactical/Inventory Choosing.cpp b/Tactical/Inventory Choosing.cpp index b59ef3665..f5c83a73c 100644 --- a/Tactical/Inventory Choosing.cpp +++ b/Tactical/Inventory Choosing.cpp @@ -672,36 +672,47 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC if ( Item[usGunIndex].defaultattachment > 0 ) { - //check for incompatibilities - for(i = 0;i 0 ) + if ( Item[usGunIndex].defaultattachment == usAttachIndex ) + usAttachIndex = 0; + else { - //check for incompatibilities w/scope + //check for incompatibilities for(i = 0;i 0 ) + { + if ( Item[usGunIndex].defaultattachment == usScopeIndex ) + usScopeIndex = 0; + else + { + //check for incompatibilities w/scope + for(i = 0;i 0 ) { @@ -725,7 +736,7 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC if ( ( bAttachClass - Item[usAttachIndex].ubCoolness ) > 0 && Random(2) ) { usAttachIndex2 = PickARandomAttachment(ATTACHMENTS,usGunIndex,bAttachClass,FALSE); - + //check for incompatibilities with 1st attachment for(i = 0;i