Added different hash func
This commit is contained in:
1 parent
251a59ddbe
commit
210c191d41
8 files changed
+39
-14
No files matched your search
+5
-5
@@ -839,8 +839,8 @@ namespace ZL
|
||||
// Берем удаленных игроков
|
||||
//latestRemotePlayers = networkClient->getRemotePlayers();
|
||||
|
||||
auto now = std::chrono::system_clock::now();
|
||||
now -= std::chrono::milliseconds(CLIENT_DELAY);
|
||||
//auto now = std::chrono::system_clock::now();
|
||||
//now -= std::chrono::milliseconds(CLIENT_DELAY);
|
||||
|
||||
for (auto const& [id, remotePlayer] : remotePlayerStates)
|
||||
{
|
||||
@@ -1000,17 +1000,17 @@ namespace ZL
|
||||
|
||||
auto latestRemotePlayers = networkClient->getRemotePlayers();
|
||||
|
||||
std::chrono::system_clock::time_point nowRounded{ std::chrono::milliseconds(newTickCount) };
|
||||
std::chrono::system_clock::time_point nowRoundedWithDelay{ std::chrono::milliseconds(newTickCount-CLIENT_DELAY) };
|
||||
|
||||
|
||||
for (auto const& [id, remotePlayer] : latestRemotePlayers) {
|
||||
|
||||
if (!remotePlayer.canFetchClientStateAtTime(nowRounded))
|
||||
if (!remotePlayer.canFetchClientStateAtTime(nowRoundedWithDelay))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ClientState playerState = remotePlayer.fetchClientStateAtTime(nowRounded);
|
||||
ClientState playerState = remotePlayer.fetchClientStateAtTime(nowRoundedWithDelay);
|
||||
|
||||
remotePlayerStates[id] = playerState;
|
||||
|
||||
|
||||
Reference in new issue
Block a user