summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-07-07 01:20:25 -0400
committerkwolekr <kwolekr@minetest.net>2014-07-07 01:20:25 -0400
commit8b3ed78e53d8ad19d8dee3968430be258559214c (patch)
tree497c583608f3d7e596e899934c9945e4a324db23 /src/map.h
parente14c4cdd4c3c9b554dc9cb91f8f29078ad337ded (diff)
downloadminetest-8b3ed78e53d8ad19d8dee3968430be258559214c.tar.gz
minetest-8b3ed78e53d8ad19d8dee3968430be258559214c.tar.bz2
minetest-8b3ed78e53d8ad19d8dee3968430be258559214c.zip
Don't unload blocks if save failed
Improve error handling in saveBlock()
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map.h b/src/map.h
index 7f482929e..4972046f5 100644
--- a/src/map.h
+++ b/src/map.h
@@ -270,7 +270,7 @@ public:
// Server implements this.
// Client leaves it as no-op.
- virtual void saveBlock(MapBlock *block){};
+ virtual bool saveBlock(MapBlock *block){ return false; };
/*
Updates usage timers and unloads unused blocks and sectors.
@@ -485,7 +485,7 @@ public:
// Returns true if sector now resides in memory
//bool deFlushSector(v2s16 p2d);
- void saveBlock(MapBlock *block);
+ bool saveBlock(MapBlock *block);
// This will generate a sector with getSector if not found.
void loadBlock(std::string sectordir, std::string blockfile, MapSector *sector, bool save_after_load=false);
MapBlock* loadBlock(v3s16 p);