Skip to content

Commit

Permalink
#23 fix ambient cubes for cutscene actors
Browse files Browse the repository at this point in the history
  • Loading branch information
XProger committed Feb 28, 2018
1 parent 695678c commit 7b88afa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/level.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7b88afa

Please sign in to comment.