Add warning for broken runtime join (#1109)

This also fixes the "no runtime join" error appearing for pre-lobby
games, where joining usually works anyways.
install-platforms
Lukas Werling 2018-01-28 17:34:45 +01:00
parent 223ab6f77b
commit 0f78e63f02
3 changed files with 24 additions and 8 deletions

View File

@ -836,6 +836,7 @@ IDS_NET_NOJOIN_BADREF=Beitritt in ausgewähltes Spiel gescheitert: %s!
IDS_NET_NOJOIN_BADVER=Falsche Engine-Version: Spiel nutzt %s - vorhanden ist %s.
IDS_NET_NOJOIN_NOREF=Keine Spielreferenz ausgewählt. Aus der Liste wählen oder Adresse für Direktbeitritt unten angeben!
IDS_NET_NOJOIN_NORUNTIME=Das Spiel läuft schon und Laufzeitbeitritt ist deaktiviert. Soll trotzdem versucht werden beizutreten?
IDS_NET_NOJOIN_RUNTIMEBROKEN=Das Spiel läuft schon. Leider funktioniert Laufzeitbeitritt in dieser Version nicht zuverlässig. Soll trotzdem versucht werden beizutreten?
IDS_NET_NONET=Netzwerk nicht aktiv
IDS_NET_NONETGAME=Übertragenes Szenario enthält keine Netzwerkspieldaten.
IDS_NET_NOOFFICIALLEAGUE=Achtung: bei der Verwendung eines inoffiziellen Internetservers sollte auf gar keinen Fall ein Passwort, welches auch auf offiziellen Servern verwendet wird, eingegeben werden!

View File

@ -836,6 +836,7 @@ IDS_NET_NOJOIN_BADREF=Cannot join selected game: %s
IDS_NET_NOJOIN_BADVER=Engine version mismatch: the game runs with %s - you have %s.
IDS_NET_NOJOIN_NOREF=No reference selected. Select a game from the list or enter a direct join address below!
IDS_NET_NOJOIN_NORUNTIME=The game has started already and runtime join is not allowed! Try joining anyway?
IDS_NET_NOJOIN_RUNTIMEBROKEN=The game has started already. Unfortunately, runtime join is unstable in this release and will likely not work. Try joining anyway?
IDS_NET_NONET=Network not active
IDS_NET_NONETGAME=Transferred scenario does not contain network game data.
IDS_NET_NOOFFICIALLEAGUE=Warning: when connecting to an unofficial internet server, you should NEVER use your password which you might use on official servers!

View File

@ -1098,16 +1098,30 @@ bool C4StartupNetDlg::DoOK()
C4GUI::Ico_Error);
return true;
}
// no runtime join
if (!pRef->isJoinAllowed())
if (pRef->getGameStatus().isPastLobby())
{
if (!::pGUI->ShowMessageModal(
LoadResStr("IDS_NET_NOJOIN_NORUNTIME"),
strNoJoin.getData(),
C4GUI::MessageDialog::btnYes | C4GUI::MessageDialog::btnNo,
C4GUI::Ico_Error))
// no runtime join
if (!pRef->isJoinAllowed())
{
return true;
if (!::pGUI->ShowMessageModal(
LoadResStr("IDS_NET_NOJOIN_NORUNTIME"),
strNoJoin.getData(),
C4GUI::MessageDialog::btnYes | C4GUI::MessageDialog::btnNo,
C4GUI::Ico_Error))
{
return true;
}
}
else
{
if (!::pGUI->ShowMessageModal(
LoadResStr("IDS_NET_NOJOIN_RUNTIMEBROKEN"),
strNoJoin.getData(),
C4GUI::MessageDialog::btnYes | C4GUI::MessageDialog::btnNo,
C4GUI::Ico_Error))
{
return true;
}
}
}
}