mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
- do NOT pause for lagging clients if game network setting set to false
This commit is contained in:
@@ -1069,9 +1069,10 @@ void ServerInterface::checkForCompletedClients(std::map<int,bool> & mapSlotSigna
|
|||||||
|
|
||||||
void ServerInterface::checkForAutoPauseForLaggingClient(int index,ConnectionSlot* connectionSlot) {
|
void ServerInterface::checkForAutoPauseForLaggingClient(int index,ConnectionSlot* connectionSlot) {
|
||||||
|
|
||||||
if (this->clientsAutoPausedDueToLag == false) {
|
if (gameSettings.getNetworkPauseGameForLaggedClients() == true &&
|
||||||
|
this->clientsAutoPausedDueToLag == false) {
|
||||||
if (connectionSlot != NULL && connectionSlot->isConnected() == true) {
|
if (connectionSlot != NULL && connectionSlot->isConnected() == true) {
|
||||||
if (connectionSlot->getAutoPauseGameCountForLag()< MAX_CLIENT_PAUSE_FOR_LAG_COUNT) {
|
if (connectionSlot->getAutoPauseGameCountForLag() < MAX_CLIENT_PAUSE_FOR_LAG_COUNT) {
|
||||||
if (this->clientLagCallbackInterface != NULL) {
|
if (this->clientLagCallbackInterface != NULL) {
|
||||||
|
|
||||||
if (this->clientsAutoPausedDueToLagTimer.isStarted() == false ||
|
if (this->clientsAutoPausedDueToLagTimer.isStarted() == false ||
|
||||||
@@ -1438,7 +1439,8 @@ void ServerInterface::dispatchPendingUnMarkCellMessages(std::vector <string> &er
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ServerInterface::checkForAutoResumeForLaggingClients() {
|
void ServerInterface::checkForAutoResumeForLaggingClients() {
|
||||||
if (this->clientsAutoPausedDueToLag == true &&
|
if (gameSettings.getNetworkPauseGameForLaggedClients() == true &&
|
||||||
|
this->clientsAutoPausedDueToLag == true &&
|
||||||
this->clientsAutoPausedDueToLagTimer.getMillis() >= MAX_CLIENT_WAIT_SECONDS_FOR_PAUSE_MILLISECONDS) {
|
this->clientsAutoPausedDueToLagTimer.getMillis() >= MAX_CLIENT_WAIT_SECONDS_FOR_PAUSE_MILLISECONDS) {
|
||||||
|
|
||||||
//printf("this->clientsAutoPausedDueToLag: %d [%lld]\n",this->clientsAutoPausedDueToLag,(long long)this->clientsAutoPausedDueToLagTimer.getMillis());
|
//printf("this->clientsAutoPausedDueToLag: %d [%lld]\n",this->clientsAutoPausedDueToLag,(long long)this->clientsAutoPausedDueToLagTimer.getMillis());
|
||||||
|
Reference in New Issue
Block a user