Actions: Fix unlock not working properly.

Pathfinding: Fix bug of map not generating if difference between z-coordinates is zero.
Code cleanup.
This commit is contained in:
zorman2000
2017-01-19 20:11:11 -05:00
parent 60b847a02a
commit dd4d445b3a
3 changed files with 18 additions and 17 deletions

View File

@ -279,6 +279,12 @@ minetest.register_on_player_receive_fields(function (player, formname, fields)
-- Get player response
local player_response = npc.dialogue.dialogue_results.options_dialogue[player_name]
-- Check if the player hit the negative option
if fields["exit"] then
-- Unlock queue, reset action timer and unfreeze NPC.
npc.unlock_actions(player_response.npc)
end
for i = 1, #player_response.options do
local button_label = "opt"..tostring(i)
if fields[button_label] then