[Scummvm-git-logs] scummvm master -> d3e81901e6ab980e1a8b654d46e159c7b2bbb4cd

mgerhardy noreply at scummvm.org
Tue Feb 15 16:19:21 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:
d3e81901e6 TWINE: Revert: the y check comes first in original source code of getBrickShape


Commit: d3e81901e6ab980e1a8b654d46e159c7b2bbb4cd
    https://github.com/scummvm/scummvm/commit/d3e81901e6ab980e1a8b654d46e159c7b2bbb4cd
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2022-02-15T17:19:16+01:00

Commit Message:
TWINE: Revert: the y check comes first in original source code of getBrickShape

This reverts commit a5f88f4b2b197c9138f2a3dfa7a088842c0d7f5f.

WorldColBrick and WorldColBrickFull both have the y check first - but for us it
breaks - see issue #13273

  https://bugs.scummvm.org/ticket/13273

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


diff --git a/engines/twine/scene/grid.cpp b/engines/twine/scene/grid.cpp
index 342d2924f0d..5015b17c4b6 100644
--- a/engines/twine/scene/grid.cpp
+++ b/engines/twine/scene/grid.cpp
@@ -706,13 +706,15 @@ BlockEntry Grid::getBlockEntry(int32 x, int32 y, int32 z) const {
 ShapeType Grid::getBrickShape(int32 x, int32 y, int32 z) {
 	const IVec3 &collision = updateCollisionCoordinates(x, y, z);
 
+	if (collision.x < 0 || collision.x >= GRID_SIZE_X) {
+		return ShapeType::kNone;
+	}
+
 	if (collision.y <= -1) {
 		return ShapeType::kSolid;
 	}
 
-	if (collision.x < 0 || collision.x >= GRID_SIZE_X
-	 || collision.y < 0 || collision.y >= GRID_SIZE_Y
-	 || collision.z < 0 || collision.z >= GRID_SIZE_Z) {
+	if (collision.y < 0 || collision.y >= GRID_SIZE_Y || collision.z < 0 || collision.z >= GRID_SIZE_Z) {
 		return ShapeType::kNone;
 	}
 




More information about the Scummvm-git-logs mailing list