This is currently only used in the lighting update for remote
players in client.
u8 light = LIGHT_MAX;
try{
// Get node at head
u8 light = LIGHT_MAX;
try{
// Get node at head
- v3s16 p = floatToInt(playerpos + v3f(0,BS+BS/2,0), BS);
+ v3s16 p = player->getLightPosition();
MapNode n = m_map->getNode(p);
light = n.getLightBlend(getDayNightRatio());
}
MapNode n = m_map->getNode(p);
light = n.getLightBlend(getDayNightRatio());
}
+ v3s16 getLightPosition() const
+ {
+ return floatToInt(m_position + v3f(0,BS+BS/2,0), BS);
+ }
+
virtual void setPosition(const v3f &position)
{
m_position = position;
virtual void setPosition(const v3f &position)
{
m_position = position;