aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2015-11-27 22:19:41 +0100
committerEugene Sandulenko2015-11-27 22:34:26 +0100
commit6e9fe0052c032e8209d8b549023e40f4e570bdd9 (patch)
tree99c60e7fce7b2d7cca6e3aacbca402749dde6a55
parent1f1c9803a7debcc09dba0959ce5457eb592dbd49 (diff)
downloadscummvm-rg350-6e9fe0052c032e8209d8b549023e40f4e570bdd9.tar.gz
scummvm-rg350-6e9fe0052c032e8209d8b549023e40f4e570bdd9.tar.bz2
scummvm-rg350-6e9fe0052c032e8209d8b549023e40f4e570bdd9.zip
CGE2: Fix rounding error
-rw-r--r--engines/cge2/vga13h.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp
index f4064f3565..eb111c3255 100644
--- a/engines/cge2/vga13h.cpp
+++ b/engines/cge2/vga13h.cpp
@@ -629,11 +629,11 @@ void Sprite::gotoxyz(V2D pos) {
if (!_follow) {
FXP m = _vm->_eye->_z / (_pos3D._z - _vm->_eye->_z);
_pos3D._x = (_vm->_eye->_x + (_vm->_eye->_x - _pos2D.x) / m);
- _pos3D._x.round();
+ _pos3D._x = _pos3D._x.round();
if (!_constY) {
_pos3D._y = _vm->_eye->_y + (_vm->_eye->_y - _pos2D.y) / m;
- _pos3D._y.round();
+ _pos3D._y = _pos3D._y.round();
}
}