diff --git a/d3xp/gamesys/Class.h b/d3xp/gamesys/Class.h index 21e6873..9dc7986 100644 --- a/d3xp/gamesys/Class.h +++ b/d3xp/gamesys/Class.h @@ -57,16 +57,16 @@ struct idEventFunc { class idEventArg { public: int type; - int value; + intptr_t value; idEventArg() { type = D_EVENT_INTEGER; value = 0; }; idEventArg( int data ) { type = D_EVENT_INTEGER; value = data; }; idEventArg( float data ) { type = D_EVENT_FLOAT; value = *reinterpret_cast( &data ); }; - idEventArg( idVec3 &data ) { type = D_EVENT_VECTOR; value = reinterpret_cast( &data ); }; - idEventArg( const idStr &data ) { type = D_EVENT_STRING; value = reinterpret_cast( data.c_str() ); }; - idEventArg( const char *data ) { type = D_EVENT_STRING; value = reinterpret_cast( data ); }; - idEventArg( const class idEntity *data ) { type = D_EVENT_ENTITY; value = reinterpret_cast( data ); }; - idEventArg( const struct trace_s *data ) { type = D_EVENT_TRACE; value = reinterpret_cast( data ); }; + idEventArg( idVec3 &data ) { type = D_EVENT_VECTOR; value = reinterpret_cast( &data ); }; + idEventArg( const idStr &data ) { type = D_EVENT_STRING; value = reinterpret_cast( data.c_str() ); }; + idEventArg( const char *data ) { type = D_EVENT_STRING; value = reinterpret_cast( data ); }; + idEventArg( const class idEntity *data ) { type = D_EVENT_ENTITY; value = reinterpret_cast( data ); }; + idEventArg( const struct trace_s *data ) { type = D_EVENT_TRACE; value = reinterpret_cast( data ); }; }; class idAllocError : public idException { diff --git a/game/gamesys/Class.h b/game/gamesys/Class.h index 21e6873..9dc7986 100644 --- a/game/gamesys/Class.h +++ b/game/gamesys/Class.h @@ -57,16 +57,16 @@ struct idEventFunc { class idEventArg { public: int type; - int value; + intptr_t value; idEventArg() { type = D_EVENT_INTEGER; value = 0; }; idEventArg( int data ) { type = D_EVENT_INTEGER; value = data; }; idEventArg( float data ) { type = D_EVENT_FLOAT; value = *reinterpret_cast( &data ); }; - idEventArg( idVec3 &data ) { type = D_EVENT_VECTOR; value = reinterpret_cast( &data ); }; - idEventArg( const idStr &data ) { type = D_EVENT_STRING; value = reinterpret_cast( data.c_str() ); }; - idEventArg( const char *data ) { type = D_EVENT_STRING; value = reinterpret_cast( data ); }; - idEventArg( const class idEntity *data ) { type = D_EVENT_ENTITY; value = reinterpret_cast( data ); }; - idEventArg( const struct trace_s *data ) { type = D_EVENT_TRACE; value = reinterpret_cast( data ); }; + idEventArg( idVec3 &data ) { type = D_EVENT_VECTOR; value = reinterpret_cast( &data ); }; + idEventArg( const idStr &data ) { type = D_EVENT_STRING; value = reinterpret_cast( data.c_str() ); }; + idEventArg( const char *data ) { type = D_EVENT_STRING; value = reinterpret_cast( data ); }; + idEventArg( const class idEntity *data ) { type = D_EVENT_ENTITY; value = reinterpret_cast( data ); }; + idEventArg( const struct trace_s *data ) { type = D_EVENT_TRACE; value = reinterpret_cast( data ); }; }; class idAllocError : public idException {