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

Conversation

Denneisk
Copy link
Member

@Denneisk Denneisk commented Apr 9, 2024

WireLib.TriggerOutput has an execution limit of 4. UpdateFriendsList calls Connected which calls UpdateOutputs which can trigger more than 4 times (and is extremely redundant).
This avoids calling the Connected method in UpdateFriendsList by inlining all the relevant parts.

@Denneisk Denneisk changed the title Fix Friends List would limit to 4 outputs Fix Friends List would limit to 4 outputted friends Apr 9, 2024
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.

@thegrb93 thegrb93 merged commit 4303f79 into wiremod:master Apr 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants