[Scummvm-git-logs] scummvm master -> 694cfd28438b6d7d1e3397ceb4799a976d8d32ac

digitall noreply at scummvm.org
Wed Feb 16 12:34:40 UTC 2022


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:
694cfd2843 TWINE: Fix Cut and Paste Error in Angle Logic


Commit: 694cfd28438b6d7d1e3397ceb4799a976d8d32ac
    https://github.com/scummvm/scummvm/commit/694cfd28438b6d7d1e3397ceb4799a976d8d32ac
Author: D G Turner (digitall at scummvm.org)
Date: 2022-02-16T12:32:54Z

Commit Message:
TWINE: Fix Cut and Paste Error in Angle Logic

This test generates a GCC Compiler Warning regarding mutually exclusive
logical operations. This needs to be a "or", rather than an "and" since
it covers the 315 to 360,0 to 45 angular discontinuity. This is as per
the earlier code in the same function.

Changed paths:
    engines/twine/scene/collision.cpp


diff --git a/engines/twine/scene/collision.cpp b/engines/twine/scene/collision.cpp
index 0e20b9729cc..04292922263 100644
--- a/engines/twine/scene/collision.cpp
+++ b/engines/twine/scene/collision.cpp
@@ -231,7 +231,7 @@ void Collision::handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, cons
 		if (newAngle >= ANGLE_225 && newAngle < ANGLE_315) {
 			processActor.x = maxsTest.x - actor->_boudingBox.mins.x;
 		}
-		if (newAngle >= ANGLE_315 && newAngle < ANGLE_45) {
+		if (newAngle >= ANGLE_315 || newAngle < ANGLE_45) {
 			processActor.z = minsTest.z - actor->_boudingBox.maxs.z;
 		}
 	} else if (!actor->_dynamicFlags.bIsFalling) {




More information about the Scummvm-git-logs mailing list