From 60b93cdfd9cfc1271ad361dbcb843258e25bf74b Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Mar 2026 09:30:59 -0700 Subject: [PATCH] rendering/game: remove leftover debug dump I/O from hot paths Remove active file-I/O debug block in character_renderer.cpp that wrote composite textures as raw binary files to /tmp on every texture composite generation. Remove the now-unused include. Remove the 10-shot hex dump of decompressed SMSG_MONSTER_MOVE payloads in game_handler.cpp (dumpCount static); format has been confirmed. --- src/game/game_handler.cpp | 10 ---------- src/rendering/character_renderer.cpp | 15 --------------- 2 files changed, 25 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 76815c3a..5eda7143 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -12280,16 +12280,6 @@ void GameHandler::handleMonsterMove(network::Packet& packet) { return; } decompressed.resize(destLen); - // Dump ALL bytes for format diagnosis (remove once confirmed) - static int dumpCount = 0; - if (dumpCount < 10) { - ++dumpCount; - std::string hex; - for (size_t i = 0; i < destLen; ++i) { - char buf[4]; snprintf(buf, sizeof(buf), "%02X ", decompressed[i]); hex += buf; - } - LOG_INFO("MonsterMove decomp[", destLen, "]: ", hex); - } std::vector stripped; bool hasWrappedForm = stripWrappedSubpacket(decompressed, stripped); diff --git a/src/rendering/character_renderer.cpp b/src/rendering/character_renderer.cpp index 59965ec8..c8fbdc79 100644 --- a/src/rendering/character_renderer.cpp +++ b/src/rendering/character_renderer.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -1061,19 +1060,6 @@ VkTexture* CharacterRenderer::compositeTextures(const std::vector& } } - // Debug: dump composite to temp dir for visual inspection - { - std::string dumpPath = (std::filesystem::temp_directory_path() / ("wowee_composite_debug_" + - std::to_string(width) + "x" + std::to_string(height) + ".raw")).string(); - std::ofstream dump(dumpPath, std::ios::binary); - if (dump) { - dump.write(reinterpret_cast(composite.data()), - static_cast(composite.size())); - core::Logger::getInstance().info("Composite debug dump: ", dumpPath, - " (", width, "x", height, ", ", composite.size(), " bytes)"); - } - } - // Upload composite to GPU via VkTexture auto tex = std::make_unique(); tex->upload(*vkCtx_, composite.data(), width, height, VK_FORMAT_R8G8B8A8_UNORM, true); @@ -2207,7 +2193,6 @@ void CharacterRenderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, return whiteTexture_.get(); }; - // One-time debug dump of rendered batches per model // Draw batches (submeshes) with per-batch textures for (const auto& batch : gpuModel.data.batches) { if (applyGeosetFilter) {