From 436495f0c7bd4eb9c6da802fb269bf1a3e752cd2 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Thu, 12 Mar 2015 19:24:50 +0100 Subject: [PATCH] Decreasing concurrent light count for better fps. --- game/graphics.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/graphics.cc b/game/graphics.cc index e0123db..d762a9d 100644 --- a/game/graphics.cc +++ b/game/graphics.cc @@ -526,9 +526,9 @@ void Graphics::updateClosestLights() { std::sort(closestLights.begin(), closestLights.end(), [this](Light a, Light b) {return compareLightDistances(a, b); }); - if (level->getLights()->size() > 32) { + if (level->getLights()->size() > 15) { closestLights = std::vector(&closestLights[0], - &closestLights[31]); + &closestLights[15]); } }