Loading...   

  • Created By Uleat On: 09:11 PM August 03, 2016
  • Link

 zone/client_packet.cpp | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp
index a827a30..98eadd1 100644
--- a/zone/client_packet.cpp
+++ b/zone/client_packet.cpp
@@ -72,6 +72,8 @@ extern PetitionList petition_list;
 extern EntityList entity_list;
 typedef void (Client::*ClientPacketProc)(const EQApplicationPacket *app);
 
+BenchTimer process_marker;
+BenchTimer event_marker;
 //Use a map for connecting opcodes since it dosent get used a lot and is sparse
 std::map<uint32, ClientPacketProc> ConnectingOpcodes;
 //Use a static array for connected, for speed
@@ -764,6 +766,8 @@ void Client::CompleteConnect()
 
 	conn_state = ClientConnectFinished;
 
+	Log.Out(Logs::General, Logs::Error, "MARK ClientConnectFinished - %f seconds", event_marker.elapsed());
+	Log.Out(Logs::General, Logs::Error, "PROCESS TIME - %f seconds", process_marker.elapsed());
 	//enforce some rules..
 	if (!CanBeInZone()) {
 		Log.Out(Logs::Detail, Logs::None, "[CLIENT] Kicking char from zone, not allowed here");
@@ -1004,6 +1008,8 @@ void Client::Handle_Connect_OP_ClientError(const EQApplicationPacket *app)
 void Client::Handle_Connect_OP_ClientReady(const EQApplicationPacket *app)
 {
 	conn_state = ClientReadyReceived;
+	Log.Out(Logs::General, Logs::Error, "MARK ClientReadyReceived - %f seconds", event_marker.elapsed());
+	event_marker.reset();
 	if (!Spawned())
 		SendZoneInPackets();
 	CompleteConnect();
@@ -1021,6 +1027,8 @@ void Client::Handle_Connect_OP_ClientUpdate(const EQApplicationPacket *app)
 void Client::Handle_Connect_OP_ReqClientSpawn(const EQApplicationPacket *app)
 {
 	conn_state = ClientSpawnRequested;
+	Log.Out(Logs::General, Logs::Error, "MARK ClientSpawnRequested - %f seconds", event_marker.elapsed());
+	event_marker.reset();
 
 	auto outapp = new EQApplicationPacket;
 
@@ -1059,6 +1067,8 @@ void Client::Handle_Connect_OP_ReqClientSpawn(const EQApplicationPacket *app)
 		SendBazaarWelcome();
 
 	conn_state = ZoneContentsSent;
+	Log.Out(Logs::General, Logs::Error, "MARK ZoneContentsSent - %f seconds", event_marker.elapsed());
+	event_marker.reset();
 
 	return;
 }
@@ -1066,6 +1076,8 @@ void Client::Handle_Connect_OP_ReqClientSpawn(const EQApplicationPacket *app)
 void Client::Handle_Connect_OP_ReqNewZone(const EQApplicationPacket *app)
 {
 	conn_state = NewZoneRequested;
+	Log.Out(Logs::General, Logs::Error, "MARK NewZoneRequested - %f seconds", event_marker.elapsed());
+	event_marker.reset();
 
 	EQApplicationPacket* outapp;
 
@@ -1197,7 +1209,12 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
 	if(strlen(cze->char_name) > 63)
 		return;
 
+	Log.Out(Logs::General, Logs::Error, "PROCESS START");
+	process_marker.reset();
+	event_marker.reset();
 	conn_state = ReceivedZoneEntry;
+	Log.Out(Logs::General, Logs::Error, "MARK ReceivedZoneEntry - %f seconds", event_marker.elapsed());
+	event_marker.reset();
 
 	SetClientVersion(Connection()->ClientVersion());
 	m_ClientVersionBit = EQEmu::versions::ConvertClientVersionToClientVersionBit(Connection()->ClientVersion());
@@ -1327,6 +1344,8 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
 	if (gmhideme) { trackable = false; }
 	/* Set Con State for Reporting */
 	conn_state = PlayerProfileLoaded;
+	Log.Out(Logs::General, Logs::Error, "MARK PlayerProfileLoaded - %f seconds", event_marker.elapsed());
+	event_marker.reset();
 
 	m_pp.zone_id = zone->GetZoneID();
 	m_pp.zoneInstance = zone->GetInstanceID();
@@ -1730,6 +1749,8 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
 
 	SetAttackTimer();
 	conn_state = ZoneInfoSent;
+	Log.Out(Logs::General, Logs::Error, "MARK ZoneInfoSent - %f seconds", event_marker.elapsed());
+	event_marker.reset();
 	zoneinpacket_timer.Start();
 	return;
 }

Raw Paste Data