again. Since monsters::pickup_item() may change the slot a weapon goes into, and includes checks with regard to picking up two melee weapons or two ranged weapons, check both the weapon and alternate weapon slots, and only fill both if the monster can wield two weapons or is a smart undead.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8665 c06c8d41-db1a-0410-9941-cceddc491573
OXXZSXR7UXHLKZSCBFPYAKY27COCXK2HICNV5ZPDQ3LUQ6SOGXXAC if (mons_wields_two_weapons(mon))mslot = MSLOT_ALT_WEAPON;
// Stupid undead can't switch between weapons.if (mons_wields_two_weapons(mon) || smart_undead)mslot = !weapon ? MSLOT_WEAPON : MSLOT_ALT_WEAPON;
{if (is_range_weapon(mitm[mon->inv[MSLOT_WEAPON]])== is_range_weapon(item)){// Two different items going into the same// slot indicate that this and further items// weren't equipment the monster died with.return;}else if (smart_undead)mslot = MSLOT_ALT_WEAPON;else{// Stupid undead can't switch between weapons.continue;}}
continue;