mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Retry tutorial join after 5 seconds
This commit is contained in:
parent
5fa9136af7
commit
939d5436b0
|
@ -1344,3 +1344,6 @@ https://ddnet.tw/discord
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1264,6 +1264,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1309,6 +1309,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1364,3 +1364,6 @@ Chat command (e.g. showall 1)
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1264,6 +1264,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1341,3 +1341,6 @@ Chat command (e.g. showall 1)
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1264,6 +1264,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1351,3 +1351,6 @@ https://ddnet.tw/discord
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1349,3 +1349,6 @@ https://ddnet.tw/discord
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1332,6 +1332,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1337,6 +1337,9 @@ Assets directory
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Server executable not found, can't run server
|
||||
==
|
||||
|
||||
|
|
|
@ -1377,3 +1377,6 @@ auto
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1363,3 +1363,6 @@ auto
|
|||
|
||||
Tutorial
|
||||
== Tutorial
|
||||
|
||||
Can't find a Tutorial server
|
||||
== Tutorial-Server kann nicht gefunden werden
|
||||
|
|
|
@ -1264,6 +1264,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1348,3 +1348,6 @@ auto
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1383,5 +1383,8 @@ https://ddnet.tw/discord
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
FPM
|
||||
==
|
||||
|
|
|
@ -1348,3 +1348,6 @@ Chat command (e.g. showall 1)
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1349,4 +1349,6 @@ auto
|
|||
== 자동
|
||||
|
||||
Tutorial
|
||||
== 튜토리얼
|
||||
== 튜토리얼
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1255,6 +1255,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1350,3 +1350,6 @@ https://ddnet.tw/discord
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1187,6 +1187,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Server executable not found, can't run server
|
||||
==
|
||||
|
||||
|
|
|
@ -1351,3 +1351,6 @@ https://ddnet.tw/discord
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -985,8 +985,6 @@ Editor
|
|||
== Editor
|
||||
|
||||
[Start menu]
|
||||
9+ new mentions
|
||||
== 9+ novas menções
|
||||
|
||||
Successfully saved the replay!
|
||||
==
|
||||
|
@ -1297,6 +1295,9 @@ Assets directory
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Run server
|
||||
==
|
||||
|
||||
|
@ -1351,3 +1352,6 @@ Grabs
|
|||
|
||||
%d new mentions
|
||||
==
|
||||
|
||||
9+ new mentions
|
||||
==
|
||||
|
|
|
@ -1270,6 +1270,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1356,3 +1356,6 @@ Chat command (e.g. showall 1)
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1265,6 +1265,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1348,3 +1348,6 @@ https://ddnet.tw/discord
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1368,3 +1368,6 @@ auto
|
|||
|
||||
Tutorial
|
||||
== 进入教学
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1264,6 +1264,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1358,3 +1358,6 @@ auto
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1350,3 +1350,6 @@ auto
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1361,3 +1361,6 @@ auto
|
|||
|
||||
Tutorial
|
||||
== 進入教學
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -1332,6 +1332,9 @@ https://wiki.ddnet.tw/
|
|||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
||||
Website
|
||||
==
|
||||
|
||||
|
|
|
@ -1348,3 +1348,6 @@ Chat command (e.g. showall 1)
|
|||
|
||||
Tutorial
|
||||
==
|
||||
|
||||
Can't find a Tutorial server
|
||||
==
|
||||
|
|
|
@ -66,13 +66,26 @@ void CMenus::RenderStartMenu(CUIRect MainView)
|
|||
ExtMenu.HSplitBottom(5.0f, &ExtMenu, 0); // little space
|
||||
ExtMenu.HSplitBottom(20.0f, &ExtMenu, &Button);
|
||||
static int s_TutorialButton;
|
||||
if(DoButton_Menu(&s_TutorialButton, Localize("Tutorial"), 0, &Button, 0, CUI::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)))
|
||||
static float s_JoinTutorialTime = 0.0f;
|
||||
if(DoButton_Menu(&s_TutorialButton, Localize("Tutorial"), 0, &Button, 0, CUI::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)) ||
|
||||
(s_JoinTutorialTime != 0.0f && Client()->LocalTime() >= s_JoinTutorialTime))
|
||||
{
|
||||
const char *pAddr = ServerBrowser()->GetTutorialServer();
|
||||
if(pAddr)
|
||||
{
|
||||
Client()->Connect(pAddr);
|
||||
s_JoinTutorialTime = 0.0f;
|
||||
}
|
||||
else if(s_JoinTutorialTime == 0.0f)
|
||||
{
|
||||
dbg_msg("menus", "couldn't find tutorial server, retrying in 5 seconds");
|
||||
s_JoinTutorialTime = Client()->LocalTime() + 5.0f;
|
||||
}
|
||||
else
|
||||
dbg_msg("menus", "couldn't find tutorial server");
|
||||
{
|
||||
PopupWarning(Localize("Warning"), Localize("Can't find a Tutorial server"), Localize("Ok"), 10000000);
|
||||
s_JoinTutorialTime = 0.0f;
|
||||
}
|
||||
m_DoubleClickIndex = -1;
|
||||
}
|
||||
|
||||
|
@ -145,7 +158,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
|
|||
}
|
||||
|
||||
static bool EditorHotkeyWasPressed = true;
|
||||
static float EditorHotKeyChecktime = 0;
|
||||
static float EditorHotKeyChecktime = 0.0f;
|
||||
Menu.HSplitBottom(5.0f, &Menu, 0); // little space
|
||||
Menu.HSplitBottom(40.0f, &Menu, &Button);
|
||||
static int s_MapEditorButton;
|
||||
|
|
Loading…
Reference in a new issue