From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: feat: TU19 (Dec 2014) Features & Content (#155) * try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki --- Minecraft.World/Packet.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'Minecraft.World/Packet.h') diff --git a/Minecraft.World/Packet.h b/Minecraft.World/Packet.h index 60410df3..7c30f6aa 100644 --- a/Minecraft.World/Packet.h +++ b/Minecraft.World/Packet.h @@ -21,26 +21,26 @@ public: int count; int totalSize; + static const int TOTAL_TICKS = 100; + // 4J Added - __int64 countSamples[512]; - __int64 sizeSamples[512]; + __int64 countSamples[TOTAL_TICKS]; + __int64 sizeSamples[TOTAL_TICKS]; + __int64 timeSamples[TOTAL_TICKS]; int samplesPos; - __int64 firstSampleTime; - public: const int id; public: - PacketStatistics(int id) : id( id ), count( 0 ), totalSize( 0 ), samplesPos( 0 ), firstSampleTime( 0 ) { countSamples[0] = 0; sizeSamples[0] = 0; } + PacketStatistics(int id); void addPacket(int bytes); int getCount(); + int getTotalSize(); double getAverageSize(); - - // 4J Added - void renderStats(); - __int64 getCountSample(int samplePos); - wstring getLegendString(); + __int64 getRunningTotal(); + __int64 getRunningCount(); + void IncrementPos(); }; // 4J JEV, replaces the static blocks. @@ -80,12 +80,8 @@ private: static vector renderableStats; static int renderPos; public: - static void recordOutgoingPacket(shared_ptr packet); - static void renderPacketStats(int id); - static void renderAllPacketStats(); - static void renderAllPacketStatsKey(); - static __int64 getIndexedStatValue(unsigned int samplePos, unsigned int renderableId); - + static void recordOutgoingPacket(shared_ptr packet, int playerIndex); + static void updatePacketStatsPIX(); private : static unordered_map statistics; //static int nextPrint; -- cgit v1.2.3