Skip to content

CS:GO weapons update #169

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

Merged
merged 18 commits into from
Dec 10, 2016
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
Prev Previous commit
Next Next commit
More speed improvements for Entity.find for CS:GO.
  • Loading branch information
satoon101 committed Dec 8, 2016
commit b25a5d6e9a01f3fa2843abfcbcba44779acc923e
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,15 @@ def find(cls, classname):
index = _weapon_names_for_definition.get(classname)
if classname in _weapon_parents and index is not None:
parent_classname = _weapon_parents[classname]
for entity in BaseEntityGenerator():
if entity.classname != parent_classname:
continue
for entity in BaseEntityGenerator(parent_classname, True):
if not entity.is_networked():
continue
if entity.get_network_property_int(
'm_AttributeManager.m_Item.m_iItemDefinitionIndex'
) == index:
return cls(entity.index)
elif classname in _parent_weapons:
for entity in BaseEntityGenerator():
if entity.classname != classname:
continue
for entity in BaseEntityGenerator(classname, True):
if not entity.is_networked():
continue
if entity.get_network_property_int(
Expand Down