From 3b0bff2f743a3abf100368f94efafa7c2843a9b7 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 21 Dec 2010 02:25:47 +0200 Subject: Cracking blocks while digging --- src/map.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 13db92651..2a517c544 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1622,6 +1622,7 @@ MapBlock * ServerMap::emergeBlock( } //dstream<<"Not found on disk, generating."<setTempMod(relpos, mod); + return blockpos; +} +v3s16 ClientMap::clearTempMod(v3s16 p) +{ + v3s16 blockpos = getNodeBlockPos(p); + MapBlock * blockref = getBlockNoCreate(blockpos); + v3s16 relpos = p - blockpos*MAP_BLOCKSIZE; + + blockref->clearTempMod(relpos); + return blockpos; } void ClientMap::PrintInfo(std::ostream &out) -- cgit v1.2.3