- bugfix for displaying units with light sources in view of the camera
This commit is contained in:
parent
bd31395f86
commit
d4cff9786a
|
@ -138,7 +138,7 @@ const Vec4f Renderer::defAmbientColor= Vec4f(1.f * ambFactor, 1.f * ambFactor, 1
|
|||
const Vec4f Renderer::defColor= Vec4f(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
//const float Renderer::maxLightDist= 100.f;
|
||||
const float Renderer::maxLightDist= 1000.f;
|
||||
const float Renderer::maxLightDist= 100.f;
|
||||
|
||||
bool Renderer::rendererEnded = true;
|
||||
|
||||
|
@ -650,6 +650,7 @@ void Renderer::setupLighting() {
|
|||
if(world->toRenderUnit(unit) &&
|
||||
unit->getCurrVector().dist(gameCamera->getPos()) < maxLightDist &&
|
||||
unit->getType()->getLight() && unit->isOperative()){
|
||||
//printf("$$$ Show light # %d / %d for Unit [%d - %s]\n",lightCount,maxLights,unit->getId(),unit->getFullName().c_str());
|
||||
|
||||
Vec4f pos= Vec4f(unit->getCurrVector());
|
||||
pos.y+=4.f;
|
||||
|
|
Loading…
Reference in New Issue
Block a user