From 08c9547a35666c06a5cb364a5096cf258551b836 Mon Sep 17 00:00:00 2001 From: XProger Date: Sat, 25 May 2019 04:33:34 +0300 Subject: [PATCH] fix pickups brightness --- src/level.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/level.h b/src/level.h index ab3c2ea..af24048 100644 --- a/src/level.h +++ b/src/level.h @@ -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] =