Quellcode durchsuchen

improve debug output

Kolja Strohm vor 9 Monaten
Ursprung
Commit
429b792999
2 geänderte Dateien mit 10 neuen und 5 gelöschten Zeilen
  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