We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf93be5 commit 3817074Copy full SHA for 3817074
addons/source-python/packages/source-python/weapons/_base.py
@@ -156,3 +156,15 @@ def set_secondary_fire_ammo(self, value):
156
def weapon_name(self):
157
"""Return the full class name of the weapon."""
158
return self.classname
159
+
160
+ def remove(self):
161
+ """Remove the weapon."""
162
+ # Avoid a cyclic import
163
+ from players.entity import Player
164
165
+ owner = self.owner
166
+ if owner is not None and owner.is_player():
167
+ player = Player(owner.index)
168
+ player.drop_weapon(self)
169
170
+ super().remove()
0 commit comments