|
@@ -925,9 +925,8 @@ void Chunk::setLightData(
|
|
|
Framework::Vec3<int> location, unsigned char* data, bool foreground)
|
|
|
{
|
|
|
int index
|
|
|
- = ((location.x * CHUNK_SIZE + location.y) * WORLD_HEIGHT + location.z)
|
|
|
- * 6;
|
|
|
- memcpy(lightData + index, data, 6);
|
|
|
+ = (location.x * CHUNK_SIZE + location.y) * WORLD_HEIGHT + location.z;
|
|
|
+ memcpy(lightData + index * 6, data, 6);
|
|
|
// check if neighbor is a visible block and send update to clients
|
|
|
bool needSend = 0;
|
|
|
for (int i = 0; i < 6; i++)
|