Flint & steel sounds: Fix bugs caused by nil position
authorparamat <mat.gregory@virginmedia.com>
Fri, 10 Mar 2017 18:43:44 +0000 (18:43 +0000)
committerparamat <mat.gregory@virginmedia.com>
Fri, 10 Mar 2017 19:30:18 +0000 (19:30 +0000)
commitad118ea98d5bf9d137bcfd8ee4daef599b5c4141
tree3c8b5c251e0f3486200e5b93da349d66a5e62b52
parentc52ad140ae76fb90ebb9e61c2f4898b06757e315
Flint & steel sounds: Fix bugs caused by nil position

Usage and tool break sounds were played at 'pointed_thing.above' which
can be nil if not pointing at anything or at an entity. This caused
sounds to be played to all players on a server non-positionally.

Fallback to player pos for sounds if 'pointed_thing.above' is nil.

Replace 'pt' variable with 'pointed_thing' in 'register_tool'.
mods/fire/init.lua