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);