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

aquadran noreply at scummvm.org
Mon Oct 14 04:30:29 UTC 2024


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:
cf703f94e6 WINTERMUTE: Small sync code on isTransparentAt


Commit: cf703f94e6943960b7e4d917168af7137cffff13
    https://github.com/scummvm/scummvm/commit/cf703f94e6943960b7e4d917168af7137cffff13
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2024-10-14T06:30:24+02:00

Commit Message:
WINTERMUTE: Small sync code on isTransparentAt

Changed paths:
    engines/wintermute/base/gfx/xmodel.cpp


diff --git a/engines/wintermute/base/gfx/xmodel.cpp b/engines/wintermute/base/gfx/xmodel.cpp
index 889e0ee0624..0fcd8c40761 100644
--- a/engines/wintermute/base/gfx/xmodel.cpp
+++ b/engines/wintermute/base/gfx/xmodel.cpp
@@ -563,16 +563,20 @@ bool XModel::isTransparentAt(int x, int y) {
 	}
 
 	Math::Ray ray = _gameRef->_renderer3D->rayIntoScene(x, y);
+	Math::Vector3d pickRayDir;
+	Math::Vector3d pickRayOrig;
+	pickRayDir = ray.getDirection();
+	pickRayOrig = ray.getOrigin();
 
 	// transform to model space
-	Math::Vector3d end = ray.getOrigin() + ray.getDirection();
+	Math::Vector3d end = pickRayOrig + pickRayDir;
 	Math::Matrix4 m = _lastWorldMat;
 	m.inverse();
-	m.transform(&ray.getOrigin(), true);
+	m.transform(&pickRayOrig, true);
 	m.transform(&end, true);
-	Math::Vector3d pickRayDirection = end - ray.getOrigin();
+	pickRayDir = end - pickRayOrig;
 
-	return !_rootFrame->pickPoly(&ray.getOrigin(), &pickRayDirection);
+	return !_rootFrame->pickPoly(&pickRayOrig, &pickRayDir);
 }
 
 //////////////////////////////////////////////////////////////////////////
@@ -593,6 +597,7 @@ void XModel::updateBoundingRect() {
 	_gameRef->_renderer3D->getWorldTransform(worldMat);
 
 	_drawingViewport = _gameRef->_renderer3D->getViewPort();
+
 	float x1 = _BBoxStart.x();
 	float x2 = _BBoxEnd.x();
 	float y1 = _BBoxStart.y();




More information about the Scummvm-git-logs mailing list