1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-02-25 07:52:43 +01:00

#23 fix ambient cubes for cutscene actors

This commit is contained in:
XProger 2018-02-28 05:07:07 +03:00
parent 695678c86e
commit 7b88afaaae

View File

@ -1369,11 +1369,9 @@ struct Level : IGame {
vec3 pos = controller->getPos();
if (ambientCache) {
AmbientCache::Cube cube;
if (Core::stats.frame != controller->jointsFrame) {
ambientCache->getAmbient(roomIndex, pos, cube);
if (cube.status == AmbientCache::Cube::READY)
memcpy(controller->ambient, cube.colors, sizeof(cube.colors)); // store last calculated ambient into controller
}
ambientCache->getAmbient(roomIndex, pos, cube);
if (cube.status == AmbientCache::Cube::READY)
memcpy(controller->ambient, cube.colors, sizeof(cube.colors)); // store last calculated ambient into controller
Core::active.shader->setParam(uAmbient, controller->ambient[0], 6);
}