HPL1: Ported fix from HPL1R project. Don't scale refs.

This fixes a game breaking bug where scaled references would create
completely broken colliders and either disappear
or otherwise create… impossible geometry
This commit is contained in:
Paweł Kołodziejski 2022-07-22 22:08:51 +02:00 committed by Eugene Sandulenko
parent a8b8b5263f
commit 73bb027ee1
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -797,7 +797,8 @@ void cMeshLoaderCollada::LoadColladaScene(TiXmlElement *apRootElem, cColladaNode
if (apColladaLightVec && GetLight(pNode->msSource, *apColladaLightVec)) {
}
// Colliders do not use scale.
else if (cString::ToLowerCase(cString::Sub(pNode->msName, 1, 8)) == "collider" || cString::ToLowerCase(cString::Sub(pNode->msName, 1, 12)) == "charcollider" || cString::ToLowerCase(cString::Sub(pNode->msName, 1, 4)) == "area") {
// Don't scale refs - ported from HPL1R project authored by zenmumbler
else if (cString::ToLowerCase(cString::Sub(pNode->msName, 1, 8)) == "collider" || cString::ToLowerCase(cString::Sub(pNode->msName, 1, 12)) == "charcollider" || cString::ToLowerCase(cString::Sub(pNode->msName, 1, 4)) == "area" || cString::ToLowerCase(cString::Sub(pNode->msName, 1, 3)) == "ref") {
}
// This a geometry node (or something else..). Apply scale as normal