Unify checks for missing COM_Parse() token
This commit is contained in:
1 parent
d58234a6c7
commit
1048073e26
4 files changed
+15
-15
No files matched your search
@@ -566,7 +566,7 @@ int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, in
|
||||
voiceChats[i].id[0] = 0;
|
||||
}
|
||||
token = COM_ParseExt(p, qtrue);
|
||||
if (!token || token[0] == 0) {
|
||||
if (!token[0]) {
|
||||
return qtrue;
|
||||
}
|
||||
if (!Q_stricmp(token, "female")) {
|
||||
@@ -586,7 +586,7 @@ int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, in
|
||||
voiceChatList->numVoiceChats = 0;
|
||||
while ( 1 ) {
|
||||
token = COM_ParseExt(p, qtrue);
|
||||
if (!token || token[0] == 0) {
|
||||
if (!token[0]) {
|
||||
return qtrue;
|
||||
}
|
||||
Com_sprintf(voiceChats[voiceChatList->numVoiceChats].id, sizeof( voiceChats[voiceChatList->numVoiceChats].id ), "%s", token);
|
||||
@@ -598,7 +598,7 @@ int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, in
|
||||
voiceChats[voiceChatList->numVoiceChats].numSounds = 0;
|
||||
while(1) {
|
||||
token = COM_ParseExt(p, qtrue);
|
||||
if (!token || token[0] == 0) {
|
||||
if (!token[0]) {
|
||||
return qtrue;
|
||||
}
|
||||
if (!Q_stricmp(token, "}"))
|
||||
@@ -606,7 +606,7 @@ int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, in
|
||||
sound = trap_S_RegisterSound( token, compress );
|
||||
voiceChats[voiceChatList->numVoiceChats].sounds[voiceChats[voiceChatList->numVoiceChats].numSounds] = sound;
|
||||
token = COM_ParseExt(p, qtrue);
|
||||
if (!token || token[0] == 0) {
|
||||
if (!token[0]) {
|
||||
return qtrue;
|
||||
}
|
||||
Com_sprintf(voiceChats[voiceChatList->numVoiceChats].chats[
|
||||
@@ -674,7 +674,7 @@ int CG_HeadModelVoiceChats( char *filename ) {
|
||||
p = &ptr;
|
||||
|
||||
token = COM_ParseExt(p, qtrue);
|
||||
if (!token || token[0] == 0) {
|
||||
if ( !token[0] ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user