[Scummvm-git-logs] scummvm master -> f03ca4a05fabdbd096000272859efa30f6fb4789

LittleToonCat noreply at scummvm.org
Thu Nov 23 23:34:19 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f03ca4a05f SCUMM HE: Send ScummVM version to session server.


Commit: f03ca4a05fabdbd096000272859efa30f6fb4789
    https://github.com/scummvm/scummvm/commit/f03ca4a05fabdbd096000272859efa30f6fb4789
Author: Little Cat (toontownlittlecat at gmail.com)
Date: 2023-11-23T19:34:09-04:00

Commit Message:
SCUMM HE: Send ScummVM version to session server.

Changed paths:
    engines/scumm/he/net/net_main.cpp


diff --git a/engines/scumm/he/net/net_main.cpp b/engines/scumm/he/net/net_main.cpp
index 96ecc46cbe6..b550a771284 100644
--- a/engines/scumm/he/net/net_main.cpp
+++ b/engines/scumm/he/net/net_main.cpp
@@ -19,6 +19,7 @@
  *
  */
 
+#include "base/version.h"
 #include "common/config-manager.h"
 
 #include "scumm/he/intern_he.h"
@@ -296,8 +297,8 @@ int Net::createSession(char *name) {
 			_sessionServerPeer = 0;
 			// Create session to the session server.
 			Common::String req = Common::String::format(
-				"{\"cmd\":\"host_session\",\"game\":\"%s\",\"version\":\"%s\",\"name\":\"%s\",\"maxplayers\":%d}",
-				_gameName.c_str(), _gameVersion.c_str(), name, _maxPlayers);
+				"{\"cmd\":\"host_session\",\"game\":\"%s\",\"version\":\"%s\",\"name\":\"%s\",\"maxplayers\":%d,\"scummvm_version\":\"%s\"}",
+				_gameName.c_str(), _gameVersion.c_str(), name, _maxPlayers, gScummVMFullVersion);
 			debugC(DEBUG_NETWORK, "NETWORK: Sending to session server: %s", req.c_str());
 			_sessionHost->send(req.c_str(), _sessionServerPeer);
 		} else {
@@ -599,8 +600,8 @@ int32 Net::updateQuerySessions() {
 	if (_sessionServerHost) {
 		// Get internet-based sessions from the session server.
 		Common::String getSessions = Common::String::format(
-			"{\"cmd\":\"get_sessions\",\"game\":\"%s\",\"version\":\"%s\"}",
-			_gameName.c_str(), _gameVersion.c_str());
+			"{\"cmd\":\"get_sessions\",\"game\":\"%s\",\"version\":\"%s\",\"scummvm_version\":\"%s\"}",
+			_gameName.c_str(), _gameVersion.c_str(), gScummVMFullVersion);
 		_sessionServerHost->send(getSessions.c_str(), 0);
 
 		_gotSessions = false;
@@ -1152,7 +1153,7 @@ void Net::remoteReceiveData() {
 			if (_gameName == "moonbase") {
 				// TODO: Host migration
 				if (!_isHost && _vm->_currentRoom == 2) {
-					_vm->displayMessage(0, "You have been disconnected from the host.\nNormally, host migration would take place, but ScummVM doesn't do that yet, so this game session will now end." );
+					_vm->displayMessage(0, "You have been disconnected from the game host.\nNormally, host migration would take place, but ScummVM doesn't do that yet, so this game session will now end.");
 					_vm->VAR(253) = 26; // gGameMode = GAME-OVER
 					_vm->runScript(2104, 1, 0, 0); // leave-game
 				}
@@ -1291,7 +1292,7 @@ void Net::handleGameData(Common::JSONValue *json, int peerIndex) {
 				if (paramsArray[0]->asIntegerNumber() == 145 && _fromUserId == 1) {
 					if (!_isHost && _vm->_currentRoom == 2) {
 						// TODO: Host migration
-						_vm->displayMessage(0, "You have been disconnected from the host.\nNormally, host migration would take place, but ScummVM doesn't do that yet, so this game session will now end.");
+						_vm->displayMessage(0, "You have been disconnected from the game host.\nNormally, host migration would take place, but ScummVM doesn't do that yet, so this game session will now end.");
 						_vm->VAR(253) = 26; // GAME-OVER
 						_vm->runScript(2104, 1, 0, 0); // leave-game
 						return;




More information about the Scummvm-git-logs mailing list