[Scummvm-git-logs] scummvm master -> 16f5a32a3a81ceeaa667de6a4cd33b4b6f7b8562
grisenti
noreply at scummvm.org
Mon Oct 9 21:27:29 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:
16f5a32a3a HPL1: Add workaround for sliding door bug
Commit: 16f5a32a3a81ceeaa667de6a4cd33b4b6f7b8562
https://github.com/scummvm/scummvm/commit/16f5a32a3a81ceeaa667de6a4cd33b4b6f7b8562
Author: grisenti (emanuele at grisenti.net)
Date: 2023-10-09T23:27:12+02:00
Commit Message:
HPL1: Add workaround for sliding door bug
Changed paths:
engines/hpl1/engine/impl/MeshLoaderCollada.cpp
diff --git a/engines/hpl1/engine/impl/MeshLoaderCollada.cpp b/engines/hpl1/engine/impl/MeshLoaderCollada.cpp
index ca4faacebe6..467190d15ca 100644
--- a/engines/hpl1/engine/impl/MeshLoaderCollada.cpp
+++ b/engines/hpl1/engine/impl/MeshLoaderCollada.cpp
@@ -1397,6 +1397,14 @@ cMeshEntity *cMeshLoaderCollada::CreateStaticMeshEntity(cColladaNode *apNode, cW
pVtxBuffer = CreateVertexBuffer(*apGeom, eVertexBufferUsageType_Static);
pVtxBuffer->Transform(apNode->m_mtxWorldTransform);
}
+ // WORKAROUND: Bug #14571: "HPL1: sliding door does not move"
+ // The original version of the Newton Dynamics library created incorrect colliders for the wall that allowed the door to move correctly.
+ // The newer version fixes that, tilting the door (which should slide upwards) forward, making it unable to move.
+ // Modifying the door collider did not solve the issue as the player would get partially blocked if they entered from the wrong direction.
+ // Position 22 is the y coordinate of the wall vertex that intersects the door, and the value is taken from another vertex position in the list.
+ if (apNode->msName == "room4_wall2") {
+ pVtxBuffer->GetArray(eVertexFlag_Position)[22] = -64.470757f;
+ }
iCollideShape *pShape = apWorld->GetPhysicsWorld()->CreateMeshShape(pVtxBuffer);
iPhysicsBody *pBody = apWorld->GetPhysicsWorld()->CreateBody(apNode->msName, pShape);
More information about the Scummvm-git-logs
mailing list