[Scummvm-git-logs] scummvm master -> 80d525e665e3c81804f6cfe11668cea8749f4d50

grisenti noreply at scummvm.org
Thu Sep 21 21:06:00 UTC 2023


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:
80d525e665 HPL1: Add workaround for helmet collider


Commit: 80d525e665e3c81804f6cfe11668cea8749f4d50
    https://github.com/scummvm/scummvm/commit/80d525e665e3c81804f6cfe11668cea8749f4d50
Author: grisenti (emanuele at grisenti.net)
Date: 2023-09-21T23:05:17+02:00

Commit Message:
HPL1: Add workaround for helmet collider

Changed paths:
    engines/hpl1/engine/graphics/Mesh.cpp


diff --git a/engines/hpl1/engine/graphics/Mesh.cpp b/engines/hpl1/engine/graphics/Mesh.cpp
old mode 100644
new mode 100755
index 719f27badd6..c37dbb1c03d
--- a/engines/hpl1/engine/graphics/Mesh.cpp
+++ b/engines/hpl1/engine/graphics/Mesh.cpp
@@ -693,6 +693,12 @@ int cMesh::GetColliderNum() {
 }
 
 iCollideShape *cMesh::CreateCollideShapeFromCollider(cMeshCollider *pCollider, iPhysicsWorld *apWorld) {
+	// WORKAROUND: Bug #14570: "HPL1: helmet stuck inside a locker"
+	// Collider creation and updating changed between the version of the Newton physics library we are using and the original version. The changes are probably in dgBody::UpdateCollisionMatrix
+	// (or in one of the functions called inside of it), called when at the creation of the helmet's PhysicsBodyNewton and after modifying the body's transformation matrix later in the loading process.
+	if (GetName() == "iron_mine_helmet.dae") {
+		return apWorld->CreateBoxShape(pCollider->mvSize - cVector3f(0.04, 0.0, 0.04), &pCollider->m_mtxOffset);
+	}
 	switch (pCollider->mType) {
 	case eCollideShapeType_Box:
 		return apWorld->CreateBoxShape(pCollider->mvSize, &pCollider->m_mtxOffset);




More information about the Scummvm-git-logs mailing list