Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions Core/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static float UpdateAndGetGameRowIndex(int lobbyID, float logicalIndex)
if (!anim.alive)
{
// start slightly below, then glide into place
anim.currentIndex = logicalIndex + 0.3f;
anim.currentIndex = logicalIndex + 2.f;
anim.targetIndex = logicalIndex;
anim.alive = true;
}
Expand All @@ -119,33 +119,14 @@ static float UpdateAndGetGameRowIndex(int lobbyID, float logicalIndex)
}

// how fast to snap into place
const float t = 0.1f;
const float t = 0.2f;

float delta = anim.targetIndex - anim.currentIndex;
anim.currentIndex += delta * t;

return anim.currentIndex;
}

// Clears animation state for IDs that no longer exist
static void CleanupMissingGameRows(const std::vector<LobbyEntry>& lobbies)
{
std::map<int, bool> stillPresent;

for (const LobbyEntry& lobby : lobbies)
{
stillPresent[lobby.lobbyID] = true;
}

for (auto it = g_gameListAnim.begin(); it != g_gameListAnim.end(); )
{
if (stillPresent.find(it->first) == stillPresent.end())
it = g_gameListAnim.erase(it);
else
++it;
}
}

static NameKeyType buttonSortAlphaID = NAMEKEY_INVALID;
static NameKeyType buttonSortPingID = NAMEKEY_INVALID;
static NameKeyType buttonSortBuddiesID = NAMEKEY_INVALID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,6 @@ void updateBuddyInfo( void )
//AsciiString strName;

int numUnreadMessages = 0;
NGMP_OnlineServices_SocialInterface* pSocialInterface = NGMP_OnlineServicesManager::GetInterface<NGMP_OnlineServices_SocialInterface>();
if (pSocialInterface != nullptr)
{
numUnreadMessages = pSocialInterface->GetNumberUnreadChatMessagesForUser(profileID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ static Bool raiseMessageBoxes = false;
static time_t gameListRefreshTime = 0;
static const time_t gameListRefreshInterval = 4000;
static time_t playerListRefreshTime = 0;
static const time_t playerListRefreshInterval = 4000;
static const time_t playerListRefreshInterval = 6000;
static bool isFirstRosterUpdate = false;

void setUnignoreText( WindowLayout *layout, AsciiString nick, GPProfile id);
static void doSliderTrack(GameWindow *control, Int val);
Expand Down Expand Up @@ -1247,6 +1248,7 @@ void WOLLobbyMenuInit( WindowLayout *layout, void *userData )
nextScreen = nullptr;
buttonPushed = false;
isShuttingDown = false;
isFirstRosterUpdate = true;

SetLobbyAttemptHostJoin(FALSE); // not trying to host or join

Expand Down Expand Up @@ -1344,7 +1346,15 @@ void WOLLobbyMenuInit( WindowLayout *layout, void *userData )
// register for roster events
pRoomsInterface->RegisterForRosterNeedsRefreshCallback([]()
{
refreshPlayerList(true);
if (isFirstRosterUpdate)
{
refreshPlayerList(true);
isFirstRosterUpdate = false;
}
else
{
refreshPlayerList(false);
}
});
}

Expand Down
Loading