diff --git a/INSTALL.md b/INSTALL.md index a1d0f46d0..118594e77 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,15 +1,8 @@ # Installing ZetaGlest -It's recommended to first [read about the system -requirements](https://zetaglest.github.io/docs/system_requirements.html). -(even though they probably need editing and updating) - You can install from source or download Installers or packages for your operating system. -There hasn't been a formal first release of ZetaGlest yet, but you may -try development snapshots. - ## Binary Packages **Note:** Installation is not necessary to run the game. You can build @@ -73,7 +66,6 @@ INSTALL_DIR_MAN:PATH=/home/andy/local/share/man/man6 If you wish to install to a location that does not require super-user privileges, change '/usr' to a location to which you have write access. - See [running](https://github.com/ZetaGlest/zetaglest-source#running) for detailed information about running a server or hosting a game. @@ -93,7 +85,6 @@ If you want to completely erase your previously-used options, remove If your build doesn't seem to be using the options you gave it, first try removing CMakeCache.txt and rebuilding. - **Note:** The majority of the game data is not installed during the steps above. The files from the zetaglest-data repo must be copied into diff --git a/mk/windows/vs2017-64/zetaglest/Start Headless Server.lnk b/mk/windows/vs2017-64/zetaglest/Start Headless Server.lnk new file mode 100644 index 000000000..9f6a54ea4 Binary files /dev/null and b/mk/windows/vs2017-64/zetaglest/Start Headless Server.lnk differ diff --git a/source/glest_game/game/script_manager.cpp b/source/glest_game/game/script_manager.cpp index 018e04a10..fc8ece017 100644 --- a/source/glest_game/game/script_manager.cpp +++ b/source/glest_game/game/script_manager.cpp @@ -457,6 +457,7 @@ namespace Game { luaScript.registerFunction(getUnitFaction, "unitFaction"); luaScript.registerFunction(getFactionName, "getFactionName"); luaScript.registerFunction(getUnitName, "unitName"); + luaScript.registerFunction(getResourceAmount, "resourceAmount"); luaScript.registerFunction(getLastCreatedUnitName, diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index b40ef1cdd..ac48268d7 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -48,7 +48,6 @@ using namespace Shared; using namespace Shared::Util; namespace Game { - const int MASTERSERVER_BROADCAST_MAX_WAIT_RESPONSE_SECONDS = 15; static const char *SAVED_GAME_FILENAME = "lastCustomGameSettings.zgg"; static const char *DEFAULT_GAME_FILENAME = "data/defaultGameSetup.zgg"; static const char *DEFAULT_NETWORKGAME_FILENAME = @@ -3828,32 +3827,30 @@ namespace Game { return; } - // Give things another chance to see if we can get a connection from the master server - if (tMasterserverErrorElapsed > 0 && + /*if (tMasterserverErrorElapsed > 0 && difftime((long int) time(NULL), tMasterserverErrorElapsed) > MASTERSERVER_BROADCAST_MAX_WAIT_RESPONSE_SECONDS) { showMasterserverError = true; masterServererErrorToShow = (serverInfo != "" ? serverInfo : "No Reply"); - } else { + } else {*/ if (tMasterserverErrorElapsed == 0) { tMasterserverErrorElapsed = time(NULL); } SystemFlags::OutputDebug(SystemFlags::debugError, - "In [%s::%s Line %d] error checking response from masterserver elapsed seconds = %.2f / %d\nResponse:\n%s\n", + "In [%s::%s Line %d] error checking response from masterserver elapsed seconds = %.2f\nResponse:\n%s\n", extractFileFromDirectoryPath (__FILE__).c_str(), __FUNCTION__, __LINE__, difftime((long int) time(NULL), tMasterserverErrorElapsed), - MASTERSERVER_BROADCAST_MAX_WAIT_RESPONSE_SECONDS, serverInfo.c_str()); - + // Give things another chance to see if we can get a connection from the master server needToRepublishToMasterserver = true; - } + //} } } else { safeMutexThreadOwner.ReleaseLock(); diff --git a/source/glest_game/network/client_interface.cpp b/source/glest_game/network/client_interface.cpp index deb849226..8e5716f52 100644 --- a/source/glest_game/network/client_interface.cpp +++ b/source/glest_game/network/client_interface.cpp @@ -1481,7 +1481,7 @@ namespace Game { } bool ClientInterface::isMasterServerAdminOverride() { - return (gameSettings.getMasterserver_admin() == this->getSessionKey()); + return gameSettings.getMasterserver_admin() == this->getSessionKey(); } void ClientInterface::waitUntilReady(Checksum* checksum) { diff --git a/source/glest_game/network/connection_slot.cpp b/source/glest_game/network/connection_slot.cpp index 51545778b..415ba04f2 100644 --- a/source/glest_game/network/connection_slot.cpp +++ b/source/glest_game/network/connection_slot.cpp @@ -852,7 +852,7 @@ namespace Game { //printf("Got uuid from client [%s]\n",this->playerUUID.c_str()); if (SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork, "In [%s::%s] got name [%s] versionString [%s], msgSessionId = %d\n", __FILE__, __FUNCTION__, name.c_str(), versionString.c_str(), msgSessionId); - if (msgSessionId != sessionKey) { + /*if (msgSessionId != sessionKey) { string playerNameStr = name; string sErr = "Client gave invalid sessionid for player [" + playerNameStr + "] actual [" + intToStr(msgSessionId) + "] expected [" + intToStr(sessionKey) + "]"; printf("%s\n", sErr.c_str()); @@ -860,7 +860,7 @@ namespace Game { close(); return; - } else if (this->playerUUID == "") { + } else */if (this->playerUUID == "") { string playerNameStr = name; string sErr = "Client gave an invalid UUID for player [" + playerNameStr + "]"; printf("%s\n", sErr.c_str()); @@ -970,7 +970,7 @@ namespace Game { throw game_runtime_error(szBuf); } - int minHeadLessPlayersRequired = Config::getInstance().getInt("MinHeadlessPlayersRequired", "2"); + int minHeadLessPlayersRequired = Config::getInstance().getInt("MinHeadlessPlayersRequired", "1"); if (this->joinGameInProgress == false && networkMessageLaunch.getMessageType() == nmtLaunch && this->ready == false && @@ -1281,6 +1281,8 @@ namespace Game { //printf("#2 Server slot got currentFrameCount = %d\n",currentFrameCount); this->currentLagCount = 0; + this->graceLagCtr = 0; + this->lastReceiveCommandListTime = time(NULL); this->setReady();