Skip to content

Added a set_attacker function to CBaseCSGrenadeProjectile for CS:GO. #366

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 3 commits into from
Dec 8, 2020
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
Changed to make the thrower set the attacker in CS:GO.
  • Loading branch information
CookStar committed Dec 8, 2020
commit 5f49fa0229ca78650d8ba397ff05ffd29a3cdf39
10 changes: 9 additions & 1 deletion addons/source-python/packages/source-python/entities/engines/csgo/csgo.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
# >> IMPORTS
# =============================================================================
# Source.Python
from entities import BaseEntityGenerator
# Entities
from . import Entity as _Entity
from entities import BaseEntityGenerator
from entities.helpers import pointer_from_inthandle
# Weapons
from weapons.manager import weapon_manager


Expand Down Expand Up @@ -68,3 +71,8 @@ def find(cls, classname):
) in (index, 0):
return cls(entity.index)
return super().find(classname)

thrower = property(
lambda self: self.__getattr__('thrower'),
lambda self, value: self.set_attacker(pointer_from_inthandle(value))
)