Browse Source

improve debug output

Kolja Strohm 2 months ago
parent
commit
429b792999
2 changed files with 10 additions and 5 deletions
  1. 2 1
      FactoryCraft/Chunk.cpp
  2. 8 4
      FactoryCraft/Constants.h

+ 2 - 1
FactoryCraft/Chunk.cpp

@@ -345,7 +345,8 @@ void Chunk::addObserver(Entity* zEntity, DoLaterHandler& laterHandler)
         NetworkMessage* msg = new NetworkMessage();
         msg->addressDimension(Game::INSTANCE->zDimension(dimensionId));
         Framework::Logging::debug()
-            << "chunk size: " << buffer.getSize() << "b";
+            << "chunk size: " << location.x << ", " << location.y << ": "
+            << buffer.getSize() << "b";
         char* message = new char[buffer.getSize()];
         buffer.lese(message, (int)buffer.getSize());
         msg->setMessage(message, (int)buffer.getSize());

+ 8 - 4
FactoryCraft/Constants.h

@@ -9,7 +9,11 @@
 #define MAX_AIR_LEVEL            450
 #define NUM_TICK_WORKERS         4
 #define ITEM_CACHE_SIZE          256
-#define DEFAULT_VIEW_DISTANCE    5
-#define MAX_SURFACE_HEIGHT       50
-#define VARIABLE_SURFACE_PART    0.5f
-#define MAX_TICKS_PER_SECOND     20
+#ifdef _DEBUG
+#    define DEFAULT_VIEW_DISTANCE 2
+#else
+#    define DEFAULT_VIEW_DISTANCE 64
+#endif
+#define MAX_SURFACE_HEIGHT    50
+#define VARIABLE_SURFACE_PART 0.5f
+#define MAX_TICKS_PER_SECOND  20