Dialogues: Fix bug with NPCs being frozen if 'Esc' button was pressed to exit dialogue

This commit is contained in:
Hector Franqui 2017-06-29 19:01:03 -04:00
parent 6141af11aa
commit bf935fd091

View File

@ -437,8 +437,8 @@ 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
-- Check if the player hit the negative option or esc button
if fields["exit"] or fields["quit"] == "true" then
-- Unlock queue, reset action timer and unfreeze NPC.
npc.unlock_actions(player_response.npc)
end