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
|
-- Get player response
|
||||||
local player_response = npc.dialogue.dialogue_results.options_dialogue[player_name]
|
local player_response = npc.dialogue.dialogue_results.options_dialogue[player_name]
|
||||||
|
|
||||||
-- Check if the player hit the negative option
|
-- Check if the player hit the negative option or esc button
|
||||||
if fields["exit"] then
|
if fields["exit"] or fields["quit"] == "true" then
|
||||||
-- Unlock queue, reset action timer and unfreeze NPC.
|
-- Unlock queue, reset action timer and unfreeze NPC.
|
||||||
npc.unlock_actions(player_response.npc)
|
npc.unlock_actions(player_response.npc)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user