File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 36
36
// -----------------------------------------------------------------------------
37
37
// typedescription_t extension class.
38
38
// -----------------------------------------------------------------------------
39
- class TypeDescExt
39
+ class TypeDescriptionExt
40
40
{
41
41
public:
42
42
static int get_flat_offset (typedescription_t pTypeDesc)
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ template<class T>
53
53
void export_engine_specific_type_description (T TypeDescription)
54
54
{
55
55
TypeDescription.def_readonly (" offset" , &typedescription_t ::fieldOffset);
56
- TypeDescription.add_property (" flat_offset" , &TypeDescExt ::get_flat_offset);
57
- TypeDescription.add_property (" packed_offset" , &TypeDescExt ::get_packed_offset);
56
+ TypeDescription.add_property (" flat_offset" , &TypeDescriptionExt ::get_flat_offset);
57
+ TypeDescription.add_property (" packed_offset" , &TypeDescriptionExt ::get_packed_offset);
58
58
TypeDescription.def_readonly (" flat_group" , &typedescription_t ::flatGroup);
59
59
}
60
60
Original file line number Diff line number Diff line change 32
32
// -----------------------------------------------------------------------------
33
33
#include " modules/memory/memory_tools.h"
34
34
#include " edict.h"
35
+ #include " isaverestore.h"
35
36
#include " datamap.h"
36
37
#include " game/server/variant_t.h"
37
38
#include " Color.h"
@@ -108,8 +109,12 @@ class TypeDescriptionSharedExt
108
109
109
110
static CPointer *get_input (typedescription_t pTypeDesc)
110
111
{
111
- // HACK!
112
- return new CPointer ((unsigned long )(void *&)pTypeDesc.inputFunc , false );
112
+ if (pTypeDesc.flags & FTYPEDESC_INPUT || pTypeDesc.flags & FTYPEDESC_FUNCTIONTABLE)
113
+ {
114
+ // HACK!
115
+ return new CPointer ((unsigned long )(void *&)pTypeDesc.inputFunc , false );
116
+ }
117
+ return NULL ;
113
118
}
114
119
};
115
120
Original file line number Diff line number Diff line change @@ -245,7 +245,6 @@ void export_field_types()
245
245
// -----------------------------------------------------------------------------
246
246
void export_type_description_flags ()
247
247
{
248
-
249
248
enum_<TypeDescriptionSharedExt::Flags> TypeDescriptionFlags (" TypeDescriptionFlags" );
250
249
251
250
// Values...
You can’t perform that action at this time.
0 commit comments