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

shkupfer noreply at scummvm.org
Mon Sep 16 23:34:27 UTC 2024


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:
a367d9ff2e SCUMM HE: BYB01 online play stat buffs fix (#6138)


Commit: a367d9ff2e6289e6ac96f5a143585ffe15839c83
    https://github.com/scummvm/scummvm/commit/a367d9ff2e6289e6ac96f5a143585ffe15839c83
Author: shkupfer (shkupf at gmail.com)
Date: 2024-09-16T19:34:24-04:00

Commit Message:
SCUMM HE: BYB01 online play stat buffs fix (#6138)

Changed paths:
    engines/scumm/script_v6.cpp


diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index 911cae9a84e..6c44e754284 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -636,6 +636,18 @@ void ScummEngine_v6::o6_eq() {
 
 // BACKYARD BASEBALL 2001 ONLINE CHANGES
 #if defined(USE_ENET) && defined(USE_LIBCURL)
+	// The player stat adjustments that should get applied in certain conditions (i.e. when two siblings are on the same team)
+	// don't get applied properly for the away (peer) team in online play. This results in each team's game using a different
+	// version of players' stats, leading to unfair play and potential desyncs. This hack ensures the away team's game doesn't
+	// exit the script before applying these stat adjustments.
+	if (_game.id == GID_BASEBALL2001 && _currentRoom == 27 && vm.slot[_currentScript].number == 2346) {
+		int offset = _scriptPointer - _scriptOrgPointer;
+		if (offset == 196137) {
+			push(0);
+			return;
+		}
+	}
+
 	if (ConfMan.getBool("enable_competitive_mods")) {
 		int pitchXValue = readVar(0x8000 + 11);
 		int pitchYValue = readVar(0x8000 + 12);




More information about the Scummvm-git-logs mailing list