| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 053c4b1 commit fd6b273
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,11 +63,6 @@ def __new__(cls, index): | |||
| 63 | 63 | # Initialize the object | |
| 64 | 64 | super(Entity, self).__init__(index) | |
| 65 | 65 | ||
| 66 | - # Set the entity's base attributes | ||
| 67 | - self._index = index | ||
| 68 | - self._edict = edict | ||
| 69 | - self._pointer = pointer_from_edict(edict) | ||
| 70 | - | ||
| 71 | 66 | # Return the instance | |
| 72 | 67 | return self | |
| 73 | 68 | ||
@@ -179,37 +174,12 @@ def _obj(cls, ptr): | |||
| 179 | 174 | """Return an entity instance of the given pointer.""" | |
| 180 | 175 | return cls(index_from_pointer(ptr)) | |
| 181 | 176 | ||
| 182 | - @property | ||
| 183 | - def index(self): | ||
| 184 | - """Return the entity's index.""" | ||
| 185 | - return self._index | ||
| 186 | - | ||
| 187 | - @property | ||
| 188 | - def edict(self): | ||
| 189 | - """Return the entity's edict instance.""" | ||
| 190 | - return self._edict | ||
| 191 | - | ||
| 192 | - @property | ||
| 193 | - def pointer(self): | ||
| 194 | - """Return the entity's pointer.""" | ||
| 195 | - return self._pointer | ||
| 196 | - | ||
| 197 | 177 | @property | |
| 198 | 178 | def instances(self): | |
| 199 | 179 | """Yield the entity's base instances.""" | |
| 200 | 180 | yield self.edict | |
| 201 | 181 | yield self.pointer | |
| 202 | 182 | ||
| 203 | - @property | ||
| 204 | - def basehandle(self): | ||
| 205 | - """Return the entity's BaseEntityHandle instance.""" | ||
| 206 | - return self.edict.networkable.get_entity_handle().get_ref_ehandle() | ||
| 207 | - | ||
| 208 | - @property | ||
| 209 | - def inthandle(self): | ||
| 210 | - """Return the entity's integer handle.""" | ||
| 211 | - return self.basehandle.to_int() | ||
| 212 | - | ||
| 213 | 183 | @property | |
| 214 | 184 | def classname(self): | |
| 215 | 185 | """Return the classname of the entity.""" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ | |||
| 31 | 31 | // Includes. | |
| 32 | 32 | //----------------------------------------------------------------------------- | |
| 33 | 33 | #include "utilities/wrap_macros.h" | |
| 34 | - #include "entities_constants_wrap.h" | ||
| 34 | + #include "entities_constants.h" | ||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | 37 | //----------------------------------------------------------------------------- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ | |||
| 31 | 31 | // Includes. | |
| 32 | 32 | //----------------------------------------------------------------------------- | |
| 33 | 33 | // #include "game/shared/predictioncopy.h" | |
| 34 | - #include "entities_datamaps_wrap.h" | ||
| 34 | + #include "entities_datamaps.h" | ||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | 37 | //----------------------------------------------------------------------------- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,7 @@ | |||
| 32 | 32 | //----------------------------------------------------------------------------- | |
| 33 | 33 | #include "dt_common.h" | |
| 34 | 34 | #include "dt_send.h" | |
| 35 | - #include "entities_props_wrap.h" | ||
| 35 | + #include "entities_props.h" | ||
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | 38 | //----------------------------------------------------------------------------- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,7 @@ | |||
| 30 | 30 | //----------------------------------------------------------------------------- | |
| 31 | 31 | // Includes. | |
| 32 | 32 | //----------------------------------------------------------------------------- | |
| 33 | - #include "entities_wrap.h" | ||
| 33 | + #include "entities.h" | ||
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | 36 | //----------------------------------------------------------------------------- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -81,6 +81,12 @@ void export_base_entity(scope _entity) | |||
| 81 | 81 | "The DataMap instance of this entity (read-only)." | |
| 82 | 82 | ); | |
| 83 | 83 | ||
| 84 | + BaseEntity.add_property("edict", make_function(&EdictFromBaseEntity, reference_existing_object_policy())); | ||
| 85 | + BaseEntity.add_property("index", &IndexFromBaseEntity); | ||
| 86 | + BaseEntity.add_property("pointer", make_function(&PointerFromBaseEntity, manage_new_object_policy())); | ||
| 87 | + BaseEntity.add_property("basehandle", &BaseHandleFromBaseEntity); | ||
| 88 | + BaseEntity.add_property("inthandle", &IntHandleFromBaseEntity); | ||
| 89 | + | ||
| 84 | 90 | // Methods... | |
| 85 | 91 | BaseEntity.def("get_key_value_string", | |
| 86 | 92 | &CBaseEntityWrapper::GetKeyValueString, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | #include "eiface.h" | |
| 37 | 37 | #include "utilities/shared_utils.h" | |
| 38 | 38 | #include "export_main.h" | |
| 39 | - #include "modules/entities/entities_entity_wrap.h" | ||
| 39 | + #include "modules/entities/entities_entity.h" | ||
| 40 | 40 | #include "icommandline.h" | |
| 41 | 41 | ||
| 42 | 42 | BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(CBaseEntity) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments