[Scummvm-git-logs] scummvm master -> 8340aa86c79a2a92b48cc16ff3eed4032aec0efc
LittleToonCat
noreply at scummvm.org
Sat Apr 8 05:48:05 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:
8340aa86c7 SCUMM HE: Fix sendGameResults opcode.
Commit: 8340aa86c79a2a92b48cc16ff3eed4032aec0efc
https://github.com/scummvm/scummvm/commit/8340aa86c79a2a92b48cc16ff3eed4032aec0efc
Author: Little Cat (toontownlittlecat at gmail.com)
Date: 2023-04-08T02:47:52-03:00
Commit Message:
SCUMM HE: Fix sendGameResults opcode.
Changed paths:
engines/scumm/he/net/net_lobby.cpp
diff --git a/engines/scumm/he/net/net_lobby.cpp b/engines/scumm/he/net/net_lobby.cpp
index a35d8d8cec5..88f21507994 100644
--- a/engines/scumm/he/net/net_lobby.cpp
+++ b/engines/scumm/he/net/net_lobby.cpp
@@ -527,6 +527,13 @@ void Lobby::sendGameResults(int userId, int arrayIndex, int unknown) {
return;
}
+ // 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)
+ userId = _userId;
+ else
+ userId = _playerId;
+
Common::JSONObject setProfileRequest;
setProfileRequest.setVal("cmd", new Common::JSONValue("game_results"));
setProfileRequest.setVal("user", new Common::JSONValue((long long int)userId));
More information about the Scummvm-git-logs
mailing list