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

Optimized player.GetBySteamID/player.GetBySteamID64 #2094

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

afxnatic
Copy link

@afxnatic afxnatic commented Jul 4, 2024

instead of doing a full loop through player.GetAll, this creates a hashtable and updates it via OnEntityCreated/EntityRemoved

this is a draft PR as its best tested in a multiplayer environment and I can't really do that easily :(

@Malivil
Copy link
Contributor

Malivil commented Jul 4, 2024

Does util.SteamIDFrom64 give unique results for bots? I can't test right now, but if it returns "BOT" then this would break for bots.

@afxnatic
Copy link
Author

afxnatic commented Jul 6, 2024

Does util.SteamIDFrom64 give unique results for bots? I can't test right now, but if it returns "BOT" then this would break for bots.

fixed by rejecting the string returned by Player:SteamID for bots, no need to do the same for player.GetBySteamID64 because Player:SteamID64 returns a different steamid for every bot

@robotboy655 robotboy655 added the Enhancement The pull request enhances current functionality. label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement The pull request enhances current functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants