mirror of
https://github.com/scummvm/scummvm.git
synced 2025-04-02 10:52:32 -04:00
HPL1: Add workaround for helmet collider
This commit is contained in:
parent
d7765997d5
commit
80d525e665
1 changed files with 6 additions and 0 deletions
6
engines/hpl1/engine/graphics/Mesh.cpp
Normal file → Executable file
6
engines/hpl1/engine/graphics/Mesh.cpp
Normal file → Executable file
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue