1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-19 11:21:31 +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) {
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;
if (type == SWITCH || type == SWITCH_WATER)
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);
if (!opaque)
buildMesh(false, mesh, level, indices, vertices, iCount, vCount, vStart, j, 0, 0, 0, 0);
TR::Entity::fixOpaque(model.type, opaque);
range.opaque &= opaque;
}
range.geometry.iCount = iCount - range.geometry.iStart;