1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-12 16:14:25 +02:00

fix pickups brightness

This commit is contained in:
XProger
2019-05-25 04:33:34 +03:00
parent 8e04fbd1e0
commit 08c9547a35

View File

@@ -1954,11 +1954,12 @@ struct Level : IGame {
vec3 pos = controller->getPos();
if (ambientCache) {
if (!entity.isDoor() && !entity.isBlock()) { // no advanced ambient lighting for secret (all) doors and blocks
if (!entity.isDoor() && !entity.isBlock() && !entity.isPickup()) { // no advanced ambient lighting for secret (all) doors and blocks
AmbientCache::Cube cube;
ambientCache->getAmbient(roomIndex, pos, cube);
if (cube.status == AmbientCache::Cube::READY)
if (cube.status == AmbientCache::Cube::READY) {
memcpy(controller->ambient, cube.colors, sizeof(cube.colors)); // store last calculated ambient into controller
}
} else {
controller->ambient[0] =
controller->ambient[1] =