Dialogues: Fix bug with NPCs being frozen if 'Esc' button was pressed to exit dialogue
This commit is contained in:
parent
6141af11aa
commit
bf935fd091
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user