[Scummvm-git-logs] scummvm master -> 68826ce2f7607800973d0b1997d17dced886d92e
LittleToonCat
noreply at scummvm.org
Wed Oct 25 01:16:55 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:
68826ce2f7 SCUMM HE: Send last update flag on game results.
Commit: 68826ce2f7607800973d0b1997d17dced886d92e
https://github.com/scummvm/scummvm/commit/68826ce2f7607800973d0b1997d17dced886d92e
Author: Little Cat (toontownlittlecat at gmail.com)
Date: 2023-10-24T22:16:45-03:00
Commit Message:
SCUMM HE: Send last update flag on game results.
Changed paths:
engines/scumm/he/logic/baseball2001.cpp
engines/scumm/he/net/net_lobby.cpp
engines/scumm/he/net/net_lobby.h
diff --git a/engines/scumm/he/logic/baseball2001.cpp b/engines/scumm/he/logic/baseball2001.cpp
index 935a6372279..10c7f32a4cc 100644
--- a/engines/scumm/he/logic/baseball2001.cpp
+++ b/engines/scumm/he/logic/baseball2001.cpp
@@ -109,6 +109,10 @@ case OP_NET_INIT:
netRemoteStartScript(numArgs, args);
break;
+ case OP_NET_CLOSE_PROVIDER:
+ _vm->_net->closeProvider();
+ break;
+
case OP_NET_QUERY_SESSIONS:
#ifdef USE_LIBCURL
if (_vm->_lobby->_sessionId) {
diff --git a/engines/scumm/he/net/net_lobby.cpp b/engines/scumm/he/net/net_lobby.cpp
index e4bfe16f252..7147554aa19 100644
--- a/engines/scumm/he/net/net_lobby.cpp
+++ b/engines/scumm/he/net/net_lobby.cpp
@@ -568,11 +568,17 @@ void Lobby::setIcon(int icon) {
send(setIconRequest);
}
-void Lobby::sendGameResults(int userId, int arrayIndex, int unknown) {
+void Lobby::sendGameResults(int userId, int arrayIndex, int lastFlag) {
if (!_socket) {
return;
}
+ // Football does not use the lastFlag argument (seems to be implemented in a
+ // later patch?), so let's force set it to true. This is safe because the game
+ // only calls it once after a game has finished.
+ if (_gameName == "football")
+ lastFlag = 1;
+
// Because the new netcode uses userIds 1 and 2 to determine between
// host and opponent, we need to replace it to represent the correct user.
if (userId == 1)
@@ -595,6 +601,7 @@ void Lobby::sendGameResults(int userId, int arrayIndex, int unknown) {
arrayData.push_back(new Common::JSONValue((long long int)data));
}
setProfileRequest.setVal("fields", new Common::JSONValue(arrayData));
+ setProfileRequest.setVal("last", new Common::JSONValue((bool)lastFlag));
send(setProfileRequest);
}
diff --git a/engines/scumm/he/net/net_lobby.h b/engines/scumm/he/net/net_lobby.h
index 7b1f5e14b54..e0a87f18422 100644
--- a/engines/scumm/he/net/net_lobby.h
+++ b/engines/scumm/he/net/net_lobby.h
@@ -138,7 +138,7 @@ protected:
void handleFileData(Common::String filename, Common::String data);
void setIcon(int icon);
- void sendGameResults(int userId, int arrayIndex, int unknown);
+ void sendGameResults(int userId, int arrayIndex, int lastFlag);
void getPopulation(int areaId, int unknown);
void handlePopulation(int areaId, int population);
More information about the Scummvm-git-logs
mailing list