aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-04-24 04:12:24 +0200
committerkwolekr <kwolekr@minetest.net>2013-04-23 22:30:09 -0400
commita699bdb7a11661778da0b45abd6a74c26b9e2237 (patch)
treea9a17f15f14d3052a549dbe6bd55fad1f016fa12 /src
parent770305e28dc0ed9aea0eefe041477a46d64eee58 (diff)
downloadminetest-a699bdb7a11661778da0b45abd6a74c26b9e2237.tar.gz
minetest-a699bdb7a11661778da0b45abd6a74c26b9e2237.tar.bz2
minetest-a699bdb7a11661778da0b45abd6a74c26b9e2237.zip
Fix to: addUpdateMeshTaskWithEdge
Check in all 6 directions instead of just 3.
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 15fb6932a..bd72737fc 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -45,6 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "IMeshCache.h"
#include "util/serialize.h"
#include "config.h"
+#include "util/directiontables.h"
#if USE_CURL
#include <curl/curl.h>
@@ -2723,21 +2724,14 @@ void Client::addUpdateMeshTaskWithEdge(v3s16 blockpos, bool ack_to_server, bool
}
catch(InvalidPositionException &e){}
// Leading edge
- try{
- v3s16 p = blockpos + v3s16(-1,0,0);
- addUpdateMeshTask(p, false, urgent);
- }
- catch(InvalidPositionException &e){}
- try{
- v3s16 p = blockpos + v3s16(0,-1,0);
- addUpdateMeshTask(p, false, urgent);
- }
- catch(InvalidPositionException &e){}
- try{
- v3s16 p = blockpos + v3s16(0,0,-1);
- addUpdateMeshTask(p, false, urgent);
+ for (int i=0;i<6;i++)
+ {
+ try{
+ v3s16 p = blockpos + g_6dirs[i];
+ addUpdateMeshTask(p, false, urgent);
+ }
+ catch(InvalidPositionException &e){}
}
- catch(InvalidPositionException &e){}
}
void Client::addUpdateMeshTaskForNode(v3s16 nodepos, bool ack_to_server, bool urgent)