Skip to content

Instantly share code, notes, and snippets.

View sapier's full-sized avatar

sapier

View GitHub Profile
index d6a4b4f..ac74602 100644
@@ -2353,10 +2353,11 @@ void GUIFormSpecMenu::drawMenu()
if (id == -1) {
m_old_tooltip_id = id;
m_old_tooltip = "";
- } else if (id != m_old_tooltip_id) {
- m_hoovered_time = getTimeMs();
- m_old_tooltip_id = id;
- } else if (id == m_old_tooltip_id) {
+ } else {
diff --git a/src/database-leveldb.cpp b/src/database-leveldb.cpp
index 1b201fc..9fe47b3 100644
--- a/src/database-leveldb.cpp
+++ b/src/database-leveldb.cpp
@@ -100,8 +100,7 @@ MapBlock* Database_LevelDB::loadBlock(v3s16 blockpos)
std::string datastr;
leveldb::Status status = m_database->Get(leveldb::ReadOptions(),
i64tos(getBlockAsInteger(blockpos)), &datastr);
- ENSURE_STATUS_OK(status);
- if (datastr.length() == 0) {
LocalPlayer* player = m_env->getLocalPlayer();
if (this == player->parent) {
player->parent = NULL;
player->isAttached = false;
}
diff --git a/build/android/Makefile b/build/android/Makefile
index 9e69343..d75c6a4 100644
--- a/build/android/Makefile
+++ b/build/android/Makefile
@@ -628,7 +628,7 @@ assets : $(ASSETS_TIMESTAMP)
clean_assets :
@$(RM) -r assets
-apk: $(PATHCFGFILE) assets $(IRRLICHT_LIB) $(CURL_LIB) \
+apk: $(PATHCFGFILE) assets $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) \
18:38:18: ERROR[EmergeThread0]: makeChunk: Pos: (1,0,-1) Blockpos-Min: (-2,-2,-2) Blockpos-Max: (2,2,2) Node-Min: (-32,-32,-32) Node-Max: (47,47,47)
18:38:31: ERROR[EmergeThread0]: makeChunk: Pos: (3,0,0) Blockpos-Min: (3,-2,-2) Blockpos-Max: (7,2,2) Node-Min: (48,-32,-32) Node-Max: (127,47,47)
18:38:48: ERROR[EmergeThread0]: makeChunk: Pos: (0,0,-3) Blockpos-Min: (-2,-2,-7) Blockpos-Max: (2,2,-3) Node-Min: (-32,-32,-112) Node-Max: (47,47,-33)
18:39:44: ERROR[EmergeThread0]: makeChunk: Pos: (3,-1,-3) Blockpos-Min: (3,-2,-7) Blockpos-Max: (7,2,-3) Node-Min: (48,-32,-112) Node-Max: (127,47,-33)
18:39:59: ERROR[EmergeThread0]: makeChunk: Pos: (4,0,-3) Blockpos-Min: (3,-2,-7) Blockpos-Max: (7,2,-3) Node-Min: (48,-32,-112) Node-Max: (127,47,-33)
18:40:05: ERROR[EmergeThread0]: makeChunk: Pos: (4,0,-2) Blockpos-Min: (3,-2,-2) Blockpos-Max: (7,2,2) Node-Min: (48,-32,-32) Node-Max: (127,47,47)
18:40:11: ERROR[EmergeThread0]: makeChunk: Pos: (2,0,2) Blockpos-Min: (-2,-2,-2) Blockpos-Max: (2,2,2) Node-Min: (-32,-32,-32
This file has been truncated, but you can view the full file.
-------------
Separator
-------------
18:11:37: INFO[main]: logfile = /mnt/sdcard/Minetest/debug.txt
18:11:37: VERBOSE[main]: httpfetch_init: parallel_limit=8
Irrlicht log: Irrlicht Engine version 1.9.0
Irrlicht log: Waiting for Android activity window to be created.
@@ -429,7 +429,7 @@ bool EmergeThread::getBlockOrStartGen(v3s16 p, MapBlock **b,
BlockMakeData *data, bool allow_gen) {
v2s16 p2d(p.X, p.Z);
//envlock: usually takes <=1ms, sometimes 90ms or ~400ms to acquire
- JMutexAutoLock envlock(m_server->m_env_mutex);
+ //JMutexAutoLock envlock(m_server->m_env_mutex);
// Load sector if it isn't loaded
if (map->getSectorNoGenerateNoEx(p2d) == NULL)
@@ -437,11 +437,27 @@ bool EmergeThread::getBlockOrStartGen(v3s16 p, MapBlock **b,
Irrlicht log: Loaded mesh: character.x
23:30:47: ERROR[EmergeThread0]: Min: (3,-2,-7) Max: (7,2,-3)
23:30:51: ERROR[EmergeThread0]: Pos: (6,3,-5) Block not found in memory: block: true isDummy=false isGenerated=false
23:30:51: ERROR[EmergeThread0]: Min: (3,3,-7) Max: (7,7,-3)
23:30:55: ERROR[EmergeThread0]: Pos: (8,2,-4) Block not found in memory: block: true isDummy=false isGenerated=false
23:30:55: ERROR[EmergeThread0]: Min: (8,-2,-7) Max: (12,2,-3)
23:30:58: ERROR[EmergeThread0]: Pos: (8,3,-4) Block not found in memory: block: true isDummy=false isGenerated=false
23:30:58: ERROR[EmergeThread0]: Min: (8,3,-7) Max: (12,7,-3)
23:31:03: ERROR[EmergeThread0]: Pos: (9,2,-2) Block not found in memory: block: true isDummy=false isGenerated=false
23:31:03: ERROR[EmergeThread0]: Min: (8,-2,-2) Max: (12,2,2)
@sapier
sapier / gist:2f5f8fb31b60f57c59a4
Last active August 29, 2015 14:03
Mintetest 0.4.10 Game selection
Game Size Included
minetest_game 750K yes
minetest_next 850K yes
carbone 3.3M yes
dreambuilder 18M maybe
nodetest 580K yes
nodetopia 850K maybe
realtest 799K maybe
@sapier
sapier / gist:1a661cf78f29ca9f03b2
Created July 2, 2014 21:26
memory leak fixes
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index a05936d..fe11d33 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -670,6 +670,7 @@ void GenericCAO::initialize(const std::string &data)
{
m_env->removePlayerName(m_name.c_str());
}
+ removeFromScene(true);
}