[Scummvm-git-logs] scummvm master -> 313cd2315e43bd0d9a052a6486dab36648a98d1b

dreammaster paulfgilbert at gmail.com
Sun Dec 16 04:24:39 CET 2018


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:
313cd2315e SHERLOCK: Fix computer aim in Serrated Scalpel's darts game


Commit: 313cd2315e43bd0d9a052a6486dab36648a98d1b
    https://github.com/scummvm/scummvm/commit/313cd2315e43bd0d9a052a6486dab36648a98d1b
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2018-12-15T19:24:36-08:00

Commit Message:
SHERLOCK: Fix computer aim in Serrated Scalpel's darts game

The computer opponent always aims for the bullseye as long as he
needs more than 50 points. After that, he's supposed to aim for
the closest score to what he needs to win. But this coordinate
was never used, and the computer player would always aim at the
same spot outside of the dart board. This, of course, made it
practically impossible for it to beat you. This commit fixes
that.

I thought at first that this fix wasn't quite right, because the
computer won't always hit the score he aims for even if you remove
the random inaccuracy from its aim. But I think it still hits
near the intended target, so maybe this is good enough?

Changed paths:
    engines/sherlock/scalpel/scalpel_darts.cpp


diff --git a/engines/sherlock/scalpel/scalpel_darts.cpp b/engines/sherlock/scalpel/scalpel_darts.cpp
index 1b7c266..2b81cb7 100644
--- a/engines/sherlock/scalpel/scalpel_darts.cpp
+++ b/engines/sherlock/scalpel/scalpel_darts.cpp
@@ -470,8 +470,8 @@ Common::Point Darts::getComputerDartDest(int playerNum) {
 			--aim;
 		} while (!done);
 
-		target.x = 75 + ((target.x - 75) * 20 / 27);
-		target.y = 75 + ((target.y - 75) * 2 / 3);
+		target.x = 75 + ((pt.x - 75) * 20 / 27);
+		target.y = 75 + ((pt.y - 75) * 2 / 3);
 	}
 
 	// Pick a level of accuracy. The higher the level, the more accurate their throw will be





More information about the Scummvm-git-logs mailing list