mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
Remove some strange code.
This commit is contained in:
parent
40d4e75d4b
commit
f6135287e6
@ -1037,9 +1037,8 @@ void USENTENCEG_InitLRU( unsigned char *plru, int count )
|
||||
|
||||
int USENTENCEG_PickSequential( int isentenceg, char *szfound, int ipick, int freset )
|
||||
{
|
||||
char *szgroupname;
|
||||
const char *szgroupname;
|
||||
unsigned char count;
|
||||
char sznum[8];
|
||||
|
||||
if( !fSentencesInit )
|
||||
return -1;
|
||||
@ -1056,10 +1055,7 @@ int USENTENCEG_PickSequential( int isentenceg, char *szfound, int ipick, int fre
|
||||
if( ipick >= count )
|
||||
ipick = count - 1;
|
||||
|
||||
strcpy( szfound, "!" );
|
||||
strcat( szfound, szgroupname );
|
||||
sprintf( sznum, "%d", ipick );
|
||||
strcat( szfound, sznum );
|
||||
sprintf( szfound, "!%s%d", szgroupname, ipick );
|
||||
|
||||
if( ipick >= count )
|
||||
{
|
||||
@ -1083,11 +1079,10 @@ int USENTENCEG_PickSequential( int isentenceg, char *szfound, int ipick, int fre
|
||||
|
||||
int USENTENCEG_Pick( int isentenceg, char *szfound )
|
||||
{
|
||||
char *szgroupname;
|
||||
const char *szgroupname;
|
||||
unsigned char *plru;
|
||||
unsigned char i;
|
||||
unsigned char count;
|
||||
char sznum[8];
|
||||
unsigned char ipick;
|
||||
int ffound = FALSE;
|
||||
|
||||
@ -1116,10 +1111,8 @@ int USENTENCEG_Pick( int isentenceg, char *szfound )
|
||||
USENTENCEG_InitLRU( plru, count );
|
||||
else
|
||||
{
|
||||
strcpy( szfound, "!" );
|
||||
strcat( szfound, szgroupname );
|
||||
sprintf( sznum, "%d", ipick );
|
||||
strcat( szfound, sznum );
|
||||
sprintf( szfound, "!%s%d", szgroupname, ipick );
|
||||
|
||||
return ipick;
|
||||
}
|
||||
}
|
||||
@ -1227,7 +1220,6 @@ int SENTENCEG_PlaySequentialSz( edict_t *entity, const char *szgroupname, float
|
||||
void SENTENCEG_Stop( edict_t *entity, int isentenceg, int ipick )
|
||||
{
|
||||
char buffer[64];
|
||||
char sznum[8];
|
||||
|
||||
if( !fSentencesInit )
|
||||
return;
|
||||
@ -1235,10 +1227,7 @@ void SENTENCEG_Stop( edict_t *entity, int isentenceg, int ipick )
|
||||
if( isentenceg < 0 || ipick < 0 )
|
||||
return;
|
||||
|
||||
strcpy( buffer, "!" );
|
||||
strcat( buffer, rgsentenceg[isentenceg].szgroupname );
|
||||
sprintf( sznum, "%d", ipick );
|
||||
strcat( buffer, sznum );
|
||||
sprintf( buffer, "!%s%d", rgsentenceg[isentenceg].szgroupname, ipick );
|
||||
|
||||
STOP_SOUND( entity, CHAN_VOICE, buffer );
|
||||
}
|
||||
@ -1369,9 +1358,8 @@ void SENTENCEG_Init()
|
||||
|
||||
int SENTENCEG_Lookup( const char *sample, char *sentencenum )
|
||||
{
|
||||
char sznum[8];
|
||||
|
||||
int i;
|
||||
|
||||
// this is a sentence name; lookup sentence number
|
||||
// and give to engine as string.
|
||||
for( i = 0; i < gcallsentences; i++ )
|
||||
@ -1379,9 +1367,7 @@ int SENTENCEG_Lookup( const char *sample, char *sentencenum )
|
||||
{
|
||||
if( sentencenum )
|
||||
{
|
||||
strcpy( sentencenum, "!" );
|
||||
sprintf( sznum, "%d", i );
|
||||
strcat( sentencenum, sznum );
|
||||
sprintf(sentencenum, "!%d", i);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user