1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Node placement / mineral / serialization / iron freq / node_dig callback

- Node placement code moved to Lua
- Mineral system removed (added default:stone_with_coal and default:stone_with_iron).
- MapBlock and MapNode serialization updated.
- Mapgen: Frequency of iron increased.
- node_dig callback and related changes.
This commit is contained in:
Kahrl 2012-01-21 00:11:44 +01:00 committed by Perttu Ahola
parent f22c73f501
commit 157a4cf18c
36 changed files with 1610 additions and 1454 deletions

View file

@ -2057,7 +2057,9 @@ void ClientEnvironment::step(float dtime)
MapNode n = m_map->getNode(p);
light = n.getLightBlend(getDayNightRatio(), m_gamedef->ndef());
}
catch(InvalidPositionException &e) {}
catch(InvalidPositionException &e){
light = blend_light(getDayNightRatio(), LIGHT_SUN, 0);
}
player->updateLight(light);
/*
@ -2104,7 +2106,6 @@ void ClientEnvironment::step(float dtime)
if(m_active_object_light_update_interval.step(dtime, 0.21))
{
// Update lighting
//u8 light = LIGHT_MAX;
u8 light = 0;
try{
// Get node at head
@ -2112,7 +2113,9 @@ void ClientEnvironment::step(float dtime)
MapNode n = m_map->getNode(p);
light = n.getLightBlend(getDayNightRatio(), m_gamedef->ndef());
}
catch(InvalidPositionException &e) {}
catch(InvalidPositionException &e){
light = blend_light(getDayNightRatio(), LIGHT_SUN, 0);
}
obj->updateLight(light);
}
}
@ -2203,7 +2206,9 @@ u16 ClientEnvironment::addActiveObject(ClientActiveObject *object)
MapNode n = m_map->getNode(p);
light = n.getLightBlend(getDayNightRatio(), m_gamedef->ndef());
}
catch(InvalidPositionException &e) {}
catch(InvalidPositionException &e){
light = blend_light(getDayNightRatio(), LIGHT_SUN, 0);
}
object->updateLight(light);
}
return object->getId();