when client is waiting only for the server at game start we now display this

This commit is contained in:
Mark Vejvoda 2011-10-26 20:30:41 +00:00
parent 33549e2b0b
commit f7a4730fff
1 changed files with 9 additions and 6 deletions

View File

@ -779,9 +779,9 @@ void ClientInterface::waitUntilReady(Checksum* checksum) {
lastMillisCheck = (chrono.getMillis() / 1000);
char szBuf[1024]="";
string updateTextFormat = lang.get("NetworkGameClientLoadStatus");
if(updateTextFormat == "" || updateTextFormat[0] == '?') {
updateTextFormat = "Waiting for network: %lld seconds elapsed (maximum wait time: %d seconds)";
string updateTextFormat = "Waiting for network: %lld seconds elapsed (maximum wait time: %d seconds)";
if(lang.hasString("NetworkGameClientLoadStatus") == true) {
updateTextFormat = lang.get("NetworkGameClientLoadStatus");
}
string waitForHosts = "";
@ -850,12 +850,15 @@ void ClientInterface::waitUntilReady(Checksum* checksum) {
}
}
if(waitForHosts == "") {
waitForHosts = lang.get("Server");
}
sprintf(szBuf,updateTextFormat.c_str(),(long long int)lastMillisCheck,int(readyWaitTimeout / 1000));
char szBuf1[1024]="";
string statusTextFormat = lang.get("NetworkGameStatusWaiting");
if(statusTextFormat == "" || statusTextFormat[0] == '?') {
statusTextFormat = "Waiting for players: %s";
string statusTextFormat = "Waiting for players: %s";
if(lang.hasString("NetworkGameStatusWaiting") == true) {
statusTextFormat = lang.get("NetworkGameStatusWaiting");
}
sprintf(szBuf1,statusTextFormat.c_str(),waitForHosts.c_str());