pSoundName is a pointer to the stringtable's version of the name, which
you shouldn't really be touching. Your strcat is writing over the top of
stringtable memory.
Try replacing:
const char *pSoundName = physprops->GetString( stepSoundName );
CSoundParameters params;
if (
hi
strcat takes the second parameter and copys the data into the first
parameter starting at the terminating null character and returns the
first parameter.
so if you pass
strcat((char*) pSoundName, "_combine")
as a parameter to a function the actual value of pSoundName will change!
So every cycle
okay, you won Alex! :-(
hey, but you forgot to write the actual sound name into szSoundName.
The easiest way to do this is to write
Q_snprintf( szSoundName, sizeof( szSoundName ), "%s%s", pSoundName,
"_combine" );
instead of
Q_strncat( szSoundName, "_combine", sizeof(szSoundName),
COPY_ALL_CHARACT
3 matches
Mail list logo