aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-08-05 11:29:06 -0400
committerMatthew Hoops2011-08-05 11:29:06 -0400
commit2b92f6df0f185028fd6cc1b335b04c2f776a7576 (patch)
tree308a4e9d6e7ef901218fa62c30d0fa8634f3bb07
parent3b3ab9a502fd76fb6cce427f3c50b709011ff7ef (diff)
downloadscummvm-rg350-2b92f6df0f185028fd6cc1b335b04c2f776a7576.tar.gz
scummvm-rg350-2b92f6df0f185028fd6cc1b335b04c2f776a7576.tar.bz2
scummvm-rg350-2b92f6df0f185028fd6cc1b335b04c2f776a7576.zip
SCUMM: Fix minor logic bug in soccer u32 op_1014
Spotted by fuzzie
-rw-r--r--engines/scumm/he/logic_he.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index 0476ed9858..d7e03eb431 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -1410,11 +1410,11 @@ int LogicHEsoccer::op_1014(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int
v15 = sqrtSquare((double)a4 * (double)a11 / (double)a12, (double)a5 * (double)a11 / (double)a12, (double)a6 * (double)a11 / (double)a12);
if (v15 != 0.0) {
- double v26 = ABS((double)a4 * (double)a11 / (double)a12 * 50.0 / v15);
+ double v26 = (double)ABS(a4) * (double)a11 / (double)a12 * 50.0 / v15;
a1 = (int)((double)a1 + v26);
- double v25 = ABS((double)a5 * (double)a11 / (double)a12 * 50.0 / v15);
+ double v25 = (double)ABS(a5) * (double)a11 / (double)a12 * 50.0 / v15;
a2 = (int)((double)a2 + v25);
- double v24 = ABS((double)a6 * (double)a11 / (double)a12 * 50.0 / v15);
+ double v24 = (double)ABS(a6) * (double)a11 / (double)a12 * 50.0 / v15;
a3 = (int)((double)a3 + v24);
}