1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-22 04:43:08 +02:00

#23 fix transparent bugs

This commit is contained in:
XProger
2017-05-01 03:55:56 +03:00
parent 84f23a627b
commit c959e63366
2 changed files with 8 additions and 1 deletions

View File

@@ -526,7 +526,13 @@ namespace TR {
} }
static void fixOpaque(Type type, bool &opaque) { static void fixOpaque(Type type, bool &opaque) {
if (type >= LARA && type <= ENEMY_GIANT_MUTANT && type != ENEMY_MUMMY && type != ENEMY_CENTAUR && type != ENEMY_MUTANT_1 && type != ENEMY_NATLA && type != DOOR_BIG_1 && type != DOOR_BIG_2) if (type >= LARA && type <= ENEMY_GIANT_MUTANT
&& type != ENEMY_REX
&& type != ENEMY_RAPTOR
&& type != ENEMY_MUTANT_1
&& type != ENEMY_CENTAUR
&& type != ENEMY_MUMMY
&& type != ENEMY_NATLA)
opaque = true; opaque = true;
if (type == SWITCH || type == SWITCH_WATER) if (type == SWITCH || type == SWITCH_WATER)
opaque = true; opaque = true;

View File

@@ -356,6 +356,7 @@ struct MeshBuilder {
bool opaque = buildMesh(true, mesh, level, indices, vertices, iCount, vCount, vStart, j, 0, 0, 0, 0); bool opaque = buildMesh(true, mesh, level, indices, vertices, iCount, vCount, vStart, j, 0, 0, 0, 0);
if (!opaque) if (!opaque)
buildMesh(false, mesh, level, indices, vertices, iCount, vCount, vStart, j, 0, 0, 0, 0); buildMesh(false, mesh, level, indices, vertices, iCount, vCount, vStart, j, 0, 0, 0, 0);
TR::Entity::fixOpaque(model.type, opaque);
range.opaque &= opaque; range.opaque &= opaque;
} }
range.geometry.iCount = iCount - range.geometry.iStart; range.geometry.iCount = iCount - range.geometry.iStart;