mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
commit before messing with water
This commit is contained in:
parent
3891bc43e0
commit
bd26be262d
2 changed files with 17 additions and 16 deletions
|
@ -858,7 +858,7 @@ void MapBlock::updateMesh(u32 daynight_ratio)
|
|||
|
||||
If there is a block above, continues from it.
|
||||
If there is no block above, assumes there is sunlight, unless
|
||||
is_underground is set.
|
||||
is_underground is set or highest node is water.
|
||||
|
||||
At the moment, all sunlighted nodes are added to light_sources.
|
||||
- SUGG: This could be optimized
|
||||
|
@ -903,7 +903,14 @@ bool MapBlock::propagateSunlight(core::map<v3s16, bool> & light_sources,
|
|||
{
|
||||
no_sunlight = true;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
MapNode n = getNode(v3s16(x, MAP_BLOCKSIZE-1, z));
|
||||
if(n.d == CONTENT_WATER || n.d == CONTENT_OCEAN)
|
||||
{
|
||||
no_sunlight = true;
|
||||
}
|
||||
}
|
||||
// NOTE: As of now, it just would make everything dark.
|
||||
// No sunlight here
|
||||
//no_sunlight = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue