aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Packet.h
diff options
context:
space:
mode:
authordaoge <3523206925@qq.com>2026-03-03 03:04:10 +0800
committerGitHub <noreply@github.com>2026-03-03 03:04:10 +0800
commitb3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch)
tree267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.World/Packet.h
parent84c31a2331f7a0ec85b9d438992e244f60e5020f (diff)
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 <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.World/Packet.h')
-rw-r--r--Minecraft.World/Packet.h28
1 files changed, 12 insertions, 16 deletions
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<PacketStatistics *> renderableStats;
static int renderPos;
public:
- static void recordOutgoingPacket(shared_ptr<Packet> 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> packet, int playerIndex);
+ static void updatePacketStatsPIX();
private :
static unordered_map<int, PacketStatistics *> statistics;
//static int nextPrint;