[Scummvm-cvs-logs] SF.net SVN: scummvm:[52207] scummvm/trunk/engines/sci/engine/kmovement.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Aug 19 13:41:13 CEST 2010
Revision: 52207
http://scummvm.svn.sourceforge.net/scummvm/?rev=52207&view=rev
Author: thebluegr
Date: 2010-08-19 11:41:13 +0000 (Thu, 19 Aug 2010)
Log Message:
-----------
SCI: Fixed bug #3039768 - "QFG3: Glitch When Making Thief Sign to Rope Maker", by fixing the implementation of kSetJump, based on Greg's SCI code. kSetJump returned an incorrect result, causing the actor to jump outside the screen
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kmovement.cpp
Modified: scummvm/trunk/engines/sci/engine/kmovement.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmovement.cpp 2010-08-19 11:18:01 UTC (rev 52206)
+++ scummvm/trunk/engines/sci/engine/kmovement.cpp 2010-08-19 11:41:13 UTC (rev 52207)
@@ -129,7 +129,7 @@
// Compute x step
if (tmp != 0)
- vx = (int)(dx * sqrt(gy / (2.0 * tmp)));
+ vx = (int16)((float)(dx * sqrt(gy / (2.0 * tmp))));
else
vx = 0;
@@ -145,7 +145,7 @@
// FIXME: This choice of vy makes t roughly (2+sqrt(2))/gy * sqrt(dy);
// so if gy==3, then t is roughly sqrt(dy)...
- vy = (int)sqrt((double)gy * ABS(2 * dy)) + 1;
+ vy = (int)sqrt((float)gy * ABS(2 * dy)) + 1;
} else {
// As stated above, the vertical direction is correlated to the horizontal by the
// (non-zero) factor c.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list