1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Do not expose CONTENT_* stuff in content_mapnode.h and use a name converter wrapper in old code

This commit is contained in:
Perttu Ahola 2011-11-16 14:08:31 +02:00
parent c0f6395cf0
commit df8346ef4d
14 changed files with 447 additions and 377 deletions

View file

@ -275,7 +275,6 @@ bool MapBlock::propagateSunlight(core::map<v3s16, bool> & light_sources,
else
{
MapNode n = getNode(v3s16(x, MAP_BLOCKSIZE-1, z));
//if(n.getContent() == CONTENT_WATER || n.getContent() == CONTENT_WATERSOURCE)
if(m_gamedef->ndef()->get(n).sunlight_propagates == false)
{
no_sunlight = true;
@ -331,26 +330,6 @@ bool MapBlock::propagateSunlight(core::map<v3s16, bool> & light_sources,
}
else if(nodemgr->get(n).light_propagates == false)
{
/*// DEPRECATED TODO: REMOVE
if(grow_grass)
{
bool upper_is_air = false;
try
{
if(getNodeParent(pos+v3s16(0,1,0)).getContent() == CONTENT_AIR)
upper_is_air = true;
}
catch(InvalidPositionException &e)
{
}
// Turn mud into grass
if(upper_is_air && n.getContent() == CONTENT_MUD
&& current_light == LIGHT_SUN)
{
n.d = CONTENT_GRASS;
}
}*/
// A solid object is on the way.
stopped_to_solid_object = true;