Skip to content

Instantly share code, notes, and snippets.

View gist:5688630
diff --git a/src/game.cpp b/src/game.cpp
index ffc69d7..22bd8c4 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -66,6 +66,7 @@
#include "sound_openal.h"
#endif
#include "event_manager.h"
+#include <iomanip>
#include <list>
View gist:5690845
diff --git a/src/server.cpp b/src/server.cpp
index 4268bb8..3af39f0 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -802,6 +802,14 @@ void PlayerInfo::PrintLine(std::ostream *s)
// Apply item aliases in the node definition manager
m_nodedef->updateAliases(m_itemdef);
+ std::set<content_t> barney;
+ m_nodedef->getIds("group:flora", barney);
View gist:5691120
diff --git a/src/modalMenu.h b/src/modalMenu.h
index d19b4e2..62bfabc 100644
--- a/src/modalMenu.h
+++ b/src/modalMenu.h
@@ -99,6 +99,7 @@ class GUIModalMenu : public gui::IGUIElement
allowFocusRemoval(true);
// This removes Environment's grab on us
Environment->removeFocus(this);
+ m_menumgr->deletingMenu(this);
this->remove();
View gist:5695206
diff --git a/src/tile.cpp b/src/tile.cpp
index 5f25e12..098a963 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -440,6 +440,10 @@ class TextureSource : public IWritableTextureSource
// Queued texture fetches (to be processed by the main thread)
RequestQueue<std::string, u32, u8, u8> m_get_texture_queue;
+
+ // Textures that have been overwritten with other ones
View gist:5700085
diff --git a/minetest.conf.example b/minetest.conf.example
index af75438..4fd443d 100644
--- a/minetest.conf.example
+++ b/minetest.conf.example
@@ -254,6 +254,10 @@
#max_block_send_distance = 10
# From how far blocks are generated for clients (value * 16 nodes)
#max_block_generate_distance = 6
+# Number of extra blocks that can be loaded by /clearobjects at once
+# This is a trade-off between sqlite transaction overhead and
View gist:5703714
diff --git a/src/tile.cpp b/src/tile.cpp
index 098a963..f176d15 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -364,14 +364,14 @@ class TextureSource : public IWritableTextureSource
// Gets a separate texture
video::ITexture* getTextureRaw(const std::string &name)
{
- AtlasPointer ap = getTexture(name + "^[forcesingle");
+ AtlasPointer ap = getTexture(name + m_forcesingle_suffix);
View gist:5724740
diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h
index 251a72e..58be711 100644
--- a/src/script/common/c_content.h
+++ b/src/script/common/c_content.h
@@ -39,19 +39,19 @@
#include "irrlichttypes_bloated.h"
#include "util/string.h"
-class MapNode;
+struct MapNode;
View gist:5773295
diff --git a/src/game.cpp b/src/game.cpp
index baf161e..cbb0d91 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1380,6 +1380,7 @@ void the_game(
false, false);
guitext_profiler->setBackgroundColor(video::SColor(120,0,0,0));
guitext_profiler->setVisible(false);
+ guitext_profiler->setWordWrap(true);
View gist:5793895
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index 3e0d7fd..a39aa4b 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -912,11 +912,20 @@ void GUIFormSpecMenu::drawMenu()
void GUIFormSpecMenu::updateSelectedItem()
{
+ // If the selected stack has become empty for some reason, deselect it.
+ // If the selected stack has become inaccessible, deselect it.
View gist:5801519
diff --git a/src/environment.cpp b/src/environment.cpp
index af05371..a97a9bd 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -2264,6 +2264,7 @@ void ClientEnvironment::step(float dtime)
Step active objects and update lighting of them
*/
+ g_profiler->avg("CEnv: num of objects", m_active_objects.size());
bool update_lighting = m_active_object_light_update_interval.step(dtime, 0.21);