sfall-team / sfall

sfall - Engine modifications for Fallout 2
https://sfall-team.github.io/sfall/
GNU General Public License v3.0
342 stars 40 forks source link

wield_obj_critter not working for misc items (vanilla issue) #471

Closed phobos2077 closed 1 year ago

phobos2077 commented 1 year ago

Trying to use wield_obj_critter to place a trap item (from EcCo, that is misc type) into player's active slot. The inven_wield_ function first checks if it's not an armor and then assumes it's a weapon and tries to read anim codes from it's prototype using wrong offsets. Then it builds art_fid for a critter wielding this "weapon" and fails, producing the message: inven_wield failed! ERROR ERROR ERROR!.

I guess it's a rare case to use this function to put misc items in hands by scripts, that's why it's not fixed yet.