|
|
|
@ -1586,7 +1586,7 @@ void UTIL_StripToken( const char *pKey, char *pDest )
@@ -1586,7 +1586,7 @@ void UTIL_StripToken( const char *pKey, char *pDest )
|
|
|
|
|
static int gSizes[FIELD_TYPECOUNT] = |
|
|
|
|
{ |
|
|
|
|
sizeof(float), // FIELD_FLOAT
|
|
|
|
|
sizeof(int), // FIELD_STRING
|
|
|
|
|
sizeof(string_t), // FIELD_STRING
|
|
|
|
|
sizeof(void*), // FIELD_ENTITY
|
|
|
|
|
sizeof(void*), // FIELD_CLASSPTR
|
|
|
|
|
sizeof(void*), // FIELD_EHANDLE
|
|
|
|
@ -1613,7 +1613,7 @@ static int gSizes[FIELD_TYPECOUNT] =
@@ -1613,7 +1613,7 @@ static int gSizes[FIELD_TYPECOUNT] =
|
|
|
|
|
static int gInputSizes[FIELD_TYPECOUNT] = |
|
|
|
|
{ |
|
|
|
|
sizeof(float), // FIELD_FLOAT
|
|
|
|
|
sizeof(int), // FIELD_STRING
|
|
|
|
|
sizeof(string_t), // FIELD_STRING
|
|
|
|
|
sizeof(int), // FIELD_ENTITY
|
|
|
|
|
sizeof(int), // FIELD_CLASSPTR
|
|
|
|
|
sizeof(int), // FIELD_EHANDLE
|
|
|
|
@ -1940,7 +1940,7 @@ void EntvarsKeyvalue( entvars_t *pev, KeyValueData *pkvd )
@@ -1940,7 +1940,7 @@ void EntvarsKeyvalue( entvars_t *pev, KeyValueData *pkvd )
|
|
|
|
|
case FIELD_MODELNAME: |
|
|
|
|
case FIELD_SOUNDNAME: |
|
|
|
|
case FIELD_STRING: |
|
|
|
|
( *(int *)( (char *)pev + pField->fieldOffset ) ) = ALLOC_STRING( pkvd->szValue ); |
|
|
|
|
( *(string_t *)( (char *)pev + pField->fieldOffset ) ) = ALLOC_STRING( pkvd->szValue ); |
|
|
|
|
break; |
|
|
|
|
case FIELD_TIME: |
|
|
|
|
case FIELD_FLOAT: |
|
|
|
@ -2014,7 +2014,7 @@ int CSave::WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFi
@@ -2014,7 +2014,7 @@ int CSave::WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFi
|
|
|
|
|
case FIELD_MODELNAME: |
|
|
|
|
case FIELD_SOUNDNAME: |
|
|
|
|
case FIELD_STRING: |
|
|
|
|
WriteString( pTest->fieldName, (int *)pOutputData, pTest->fieldSize ); |
|
|
|
|
WriteString( pTest->fieldName, (string_t *)pOutputData, pTest->fieldSize ); |
|
|
|
|
break; |
|
|
|
|
case FIELD_CLASSPTR: |
|
|
|
|
case FIELD_EVARS: |
|
|
|
@ -2197,14 +2197,14 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
@@ -2197,14 +2197,14 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
|
|
|
|
|
} |
|
|
|
|
pInputData = pString; |
|
|
|
|
if( strlen( (char *)pInputData ) == 0 ) |
|
|
|
|
*( (int *)pOutputData ) = 0; |
|
|
|
|
*( (string_t *)pOutputData ) = 0; |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
int string; |
|
|
|
|
string_t string; |
|
|
|
|
|
|
|
|
|
string = ALLOC_STRING( (char *)pInputData ); |
|
|
|
|
|
|
|
|
|
*( (int *)pOutputData ) = string; |
|
|
|
|
*( (string_t *)pOutputData ) = string; |
|
|
|
|
|
|
|
|
|
if( !FStringNull( string ) && m_precache ) |
|
|
|
|
{ |
|
|
|
|