Skip to content

Commit 4e265d4

Browse files
committed
Entity is now inheriting from Pointer.
1 parent 620d6c3 commit 4e265d4

File tree

1 file changed

+4
-2
lines changed
  • addons/source-python/packages/source-python/entities

1 file changed

+4
-2
lines changed

Diff for: addons/source-python/packages/source-python/entities/_base.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
# Mathlib
5353
from mathlib import NULL_VECTOR
5454
# Memory
55+
from memory import Pointer
5556
from memory import make_object
5657
from memory.helpers import MemberFunction
5758
# Players
@@ -189,7 +190,7 @@ def cache(cls):
189190
return cls._cache
190191

191192

192-
class Entity(BaseEntity, metaclass=_EntityCaching):
193+
class Entity(BaseEntity, Pointer, metaclass=_EntityCaching):
193194
"""Class used to interact directly with entities.
194195
195196
Beside the standard way of doing stuff via methods and properties this
@@ -224,7 +225,8 @@ def __init__(self, index, caching=True):
224225
Whether to lookup the cache for an existing instance or not.
225226
"""
226227
# Initialize the object
227-
super().__init__(index)
228+
BaseEntity.__init__(self, index)
229+
Pointer.__init__(self, self.pointer)
228230

229231
# Set the entity's base attributes
230232
type(self).index.set_cached_value(self, index)

0 commit comments

Comments
 (0)