summaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-10 07:38:51 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-11 15:22:35 +0200
commit98fa00db12b4658f6bce61f0a2c03c69b963f8f2 (patch)
treeda74b69d135ee5faf2367fdd49b6feeb09cf0802 /src/environment.cpp
parent69fca4f3cb59b3c3c5788830807d241fc8a0fc9a (diff)
downloadminetest-98fa00db12b4658f6bce61f0a2c03c69b963f8f2.tar.gz
minetest-98fa00db12b4658f6bce61f0a2c03c69b963f8f2.tar.bz2
minetest-98fa00db12b4658f6bce61f0a2c03c69b963f8f2.zip
Introduce Player::getLightPosition
This is currently only used in the lighting update for remote players in client.
Diffstat (limited to 'src/environment.cpp')
-rw-r--r--src/environment.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index 680d209fc..e293eb511 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -1653,7 +1653,7 @@ void ClientEnvironment::step(float dtime)
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());
}