aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2014-12-08 02:34:29 +0100
committerKahrl <kahrl@gmx.net>2014-12-08 08:53:31 +0100
commit4f23778e53db9bfa67bd9d15033c98f1b14b3202 (patch)
tree262d29cd54947bd1ea43b786d156fca23b07aed1
parentd0be8238074dd15254838e4af12069ff4bef67d2 (diff)
downloadminetest-4f23778e53db9bfa67bd9d15033c98f1b14b3202.tar.gz
minetest-4f23778e53db9bfa67bd9d15033c98f1b14b3202.tar.bz2
minetest-4f23778e53db9bfa67bd9d15033c98f1b14b3202.zip
Fix lighting artifacts (Issue #1887).
-rw-r--r--src/client.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/client.cpp b/src/client.cpp
index b05787b36..5b4eb7d10 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2348,10 +2348,8 @@ void Client::removeNode(v3s16 p)
i = modified_blocks.begin();
i != modified_blocks.end(); ++i)
{
- addUpdateMeshTask(i->first, false, false);
+ addUpdateMeshTaskWithEdge(i->first, false, true);
}
- // add urgent task to update the modified node
- addUpdateMeshTaskForNode(p, false, true);
}
void Client::addNode(v3s16 p, MapNode n, bool remove_metadata)
@@ -2372,7 +2370,7 @@ void Client::addNode(v3s16 p, MapNode n, bool remove_metadata)
i = modified_blocks.begin();
i != modified_blocks.end(); ++i)
{
- addUpdateMeshTask(i->first, false, false);
+ addUpdateMeshTaskWithEdge(i->first, false, true);
}
}
@@ -2621,9 +2619,7 @@ void Client::addUpdateMeshTask(v3s16 p, bool ack_to_server, bool urgent)
void Client::addUpdateMeshTaskWithEdge(v3s16 blockpos, bool ack_to_server, bool urgent)
{
try{
- v3s16 p = blockpos + v3s16(0,0,0);
- //MapBlock *b = m_env.getMap().getBlockNoCreate(p);
- addUpdateMeshTask(p, ack_to_server, urgent);
+ addUpdateMeshTask(blockpos, ack_to_server, urgent);
}
catch(InvalidPositionException &e){}
@@ -2651,8 +2647,7 @@ void Client::addUpdateMeshTaskForNode(v3s16 nodepos, bool ack_to_server, bool ur
v3s16 blockpos_relative = blockpos * MAP_BLOCKSIZE;
try{
- v3s16 p = blockpos + v3s16(0,0,0);
- addUpdateMeshTask(p, ack_to_server, urgent);
+ addUpdateMeshTask(blockpos, ack_to_server, urgent);
}
catch(InvalidPositionException &e){}