diff options
author | Kahrl <kahrl@gmx.net> | 2011-09-21 18:37:29 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2011-09-21 18:37:29 +0200 |
commit | 3e012122d1607a6269af4e4522305d8b5efcd9d4 (patch) | |
tree | 62682ee2228d2cf76e3d90c7f8360c9148802417 /src/environment.cpp | |
parent | a4a2c348318139ae9605cf0d7477fe93e8aa2651 (diff) | |
download | hax-minetest-server-3e012122d1607a6269af4e4522305d8b5efcd9d4.tar.gz hax-minetest-server-3e012122d1607a6269af4e4522305d8b5efcd9d4.zip |
Simplistic wielded tool lighting, added setMeshVerticesColor to utility.h and refactored some other code into calls of that
Diffstat (limited to '')
-rw-r--r-- | src/environment.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/environment.cpp b/src/environment.cpp index 80f41f9fd..ea33274df 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -1686,18 +1686,19 @@ void ClientEnvironment::step(float dtime) // Move player->move(dtime, *m_map, 100*BS); - // Update lighting on remote players on client - u8 light = LIGHT_MAX; - try{ - // Get node at head - v3s16 p = player->getLightPosition(); - MapNode n = m_map->getNode(p); - light = n.getLightBlend(getDayNightRatio()); - } - catch(InvalidPositionException &e) {} - player->updateLight(light); } + // Update lighting on all players on client + u8 light = LIGHT_MAX; + try{ + // Get node at head + v3s16 p = player->getLightPosition(); + MapNode n = m_map->getNode(p); + light = n.getLightBlend(getDayNightRatio()); + } + catch(InvalidPositionException &e) {} + player->updateLight(light); + /* Add footsteps to grass */ |