Capturing sky color

This commit is contained in:
yvt 2014-03-11 03:46:14 +09:00
parent cf8d4f3cb0
commit a553cb1ea4

View File

@ -92,18 +92,18 @@ namespace spades {
if(!p->IsAlive()) return;
IntVector3 outBlockCoord;
uint32_t col;
if(!world->GetMap()->CastRay(p->GetEye(),
p->GetFront(),
256.f, outBlockCoord)){
return;
auto c = world->GetFogColor();
col = c.x | c.y<<8 | c.z<<16;
}else{
col = world->GetMap()->GetColorWrapped(outBlockCoord.x,
outBlockCoord.y,
outBlockCoord.z);
}
uint32_t col = world->GetMap()->GetColorWrapped(outBlockCoord.x,
outBlockCoord.y,
outBlockCoord.z);
IntVector3 colV;
colV.x = (uint8_t)(col);
colV.y = (uint8_t)(col >> 8);