Skip to content

Commit

Permalink
WorldSession: Remove unusedd sync timer
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa authored and killerwife committed Aug 16, 2024
1 parent 3d1e313 commit 5605840
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions src/game/Server/WorldSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8
m_inQueue(false), m_playerLoading(false), m_kickSession(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(true),
m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(sObjectMgr.GetStorageLocaleIndexFor(locale)),
m_latency(0), m_clientTimeDelay(0), m_tutorialState(TUTORIALDATA_UNCHANGED), m_sessionState(WORLD_SESSION_STATE_CREATED),
m_timeSyncClockDeltaQueue(6), m_timeSyncClockDelta(0), m_pendingTimeSyncRequests(), m_timeSyncNextCounter(0), m_timeSyncTimer(0),
m_timeSyncClockDeltaQueue(6), m_timeSyncClockDelta(0), m_pendingTimeSyncRequests(), m_timeSyncNextCounter(0),
m_requestSocket(nullptr), m_recruitingFriendId(recruitingFriend), m_isRecruiter(isARecruiter) {}

/// WorldSession destructor
Expand Down Expand Up @@ -1275,8 +1275,6 @@ void WorldSession::SendTimeSync()

m_pendingTimeSyncRequests[m_timeSyncNextCounter] = WorldTimer::getMSTime();

// Schedule next sync in 10 sec (except for the 2 first packets, which are spaced by only 5s)
m_timeSyncTimer = m_timeSyncNextCounter == 0 ? 5000 : 10000;
m_timeSyncNextCounter++;
}

Expand Down
1 change: 0 additions & 1 deletion src/game/Server/WorldSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,6 @@ class WorldSession

std::map<uint32, uint32> m_pendingTimeSyncRequests; // key: counter. value: server time when packet with that counter was sent.
uint32 m_timeSyncNextCounter;
uint32 m_timeSyncTimer;

// Recruit-A-Friend
uint32 m_recruitingFriendId;
Expand Down

0 comments on commit 5605840

Please sign in to comment.