1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-02 19:27:50 +02:00

fix CUT_4 scion rendering

This commit is contained in:
XProger
2019-05-23 03:42:41 +03:00
parent 1067386e65
commit 1602cb29db
4 changed files with 7 additions and 5 deletions

View File

@@ -1324,7 +1324,9 @@ struct Controller {
} }
mat4 getMatrix() { mat4 getMatrix() {
if (level->isCutsceneLevel() && (getEntity().isActor() || getEntity().isLara())) const TR::Entity &e = getEntity();
if (level->isCutsceneLevel() && (e.isActor() || e.isLara()) && e.type != TR::Entity::CUT_4)
return level->cutMatrix; return level->cutMatrix;
if (!lockMatrix) { if (!lockMatrix) {

View File

@@ -122,7 +122,7 @@
#include "utils.h" #include "utils.h"
// muse be equal with base shader // muse be equal with base shader
#define SHADOW_TEX_SIZE 1024 #define SHADOW_TEX_SIZE 2048
extern void* osMutexInit (); extern void* osMutexInit ();
extern void osMutexFree (void *obj); extern void osMutexFree (void *obj);

View File

@@ -1993,7 +1993,7 @@ namespace TR {
&& type != ENEMY_MUMMY && type != ENEMY_MUMMY
&& type != ENEMY_NATLA) && type != ENEMY_NATLA)
opaque = true; opaque = true;
if (type == SWITCH || type == SWITCH_WATER) if (type == SWITCH || type == SWITCH_WATER || type == CUT_1)
opaque = true; opaque = true;
if ((type >= PUZZLE_HOLE_1 && type <= PUZZLE_HOLE_4) || type == LIGHTNING) if ((type >= PUZZLE_HOLE_1 && type <= PUZZLE_HOLE_4) || type == LIGHTNING)
opaque = false; opaque = false;
@@ -3793,7 +3793,7 @@ namespace TR {
if (isCutsceneLevel()) { if (isCutsceneLevel()) {
for (int i = 0; i < entitiesBaseCount; i++) { for (int i = 0; i < entitiesBaseCount; i++) {
Entity &e = entities[i]; Entity &e = entities[i];
if ((((version & VER_TR1)) && e.isActor()) || if ((((version & VER_TR1)) && e.type == Entity::CUT_1) ||
(((version & (VER_TR2 | VER_TR3))) && e.isLara())) { (((version & (VER_TR2 | VER_TR3))) && e.isLara())) {
cutEntity = i; cutEntity = i;
break; break;

View File

@@ -1949,7 +1949,7 @@ struct Level : IGame {
if (isModel) { // model if (isModel) { // model
ASSERT(controller->intensity >= 0.0f); ASSERT(controller->intensity >= 0.0f);
setMainLight(controller); setMainLight(level.isCutsceneLevel() ? player : controller);
setRoomParams(roomIndex, type, 1.0f, controller->intensity, controller->specular, 1.0f, mesh->transparent == 1); setRoomParams(roomIndex, type, 1.0f, controller->intensity, controller->specular, 1.0f, mesh->transparent == 1);
vec3 pos = controller->getPos(); vec3 pos = controller->getPos();