forked from Mirrors/openclonk
fix dialogue stopping and waiting time (#1597)
First stop the dialogue properly and then wait for 30 frames to start a new one.objectmenu
parent
79e0402683
commit
d607824df2
|
@ -193,8 +193,7 @@ public func StopDialogue()
|
|||
// clear remembered positions
|
||||
dlg_last_opt_sel = nil;
|
||||
// put on wait for a while; then reenable
|
||||
SetDialogueStatus(DLG_Status_Wait);
|
||||
ScheduleCall(this, this.SetDialogueStatus, 30, 1, DLG_Status_Stop);
|
||||
SetDialogueStatus(DLG_Status_Stop);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -245,7 +244,8 @@ public func Interact(object clonk)
|
|||
if (dlg_status == DLG_Status_Stop)
|
||||
{
|
||||
clonk->CloseMenu();
|
||||
dlg_status = DLG_Status_Active;
|
||||
dlg_status = DLG_Status_Wait;
|
||||
ScheduleCall(this, this.SetDialogueStatus, 30, 0, DLG_Status_Active);
|
||||
// Do a call on a closed dialogue as well.
|
||||
var fn_closed = Format("~Dlg_%s_Closed", dlg_name);
|
||||
if (!Call(fn_closed, clonk, dlg_target))
|
||||
|
|
Loading…
Reference in New Issue