Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Friends List would limit to 4 outputted friends #3033

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Changes from 1 commit
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
11 changes: 9 additions & 2 deletions lua/entities/gmod_wire_friendslist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,15 @@ function ENT:UpdateFriendslist( friends_steamids )
end

local plys = player.GetHumans()
for i=1,#plys do
self:Connected( plys[i] )
for i = 1, #plys do
local ply = plys[i]
local steamid = ply:SteamID()

if self.friends_lookup[ply] then return end
Copy link
Contributor

@thegrb93 thegrb93 Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad early return. Should be 'continue'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, copying error.


if self.steamids_lookup[steamid] then
self.friends_lookup[ply] = true
end
end

self:UpdateOutputs()
Expand Down
Loading