segabl / pd2-third-person

Experimental BLT mod that implements and enables third person mode
GNU General Public License v3.0
12 stars 7 forks source link

Fix custom weapon crash? #1

Closed DrNewbie closed 6 years ago

DrNewbie commented 6 years ago

mods/BeardLib/Hooks/CoreSystem.lua:18: attempt to index local 'unit_name' (a nil value) SCRIPT STACK add_unit_by_name() lib/units/beings/player/huskplayerinventory.lua:67 _perform_switch_equipped_weapon() lib/units/beings/player/huskplayerinventory.lua:31 synch_equipped_weapon() lib/units/beings/player/huskplayerinventory.lua:20 ...

segabl commented 6 years ago

I will use a different approach so custom weapons are only replaced if there's no npc unit for them. Thanks for your pull request though.