Fix 'missing token' in parsers for animations.cfg
This commit is contained in:
1 parent
6e340f9a5b
commit
d58234a6c7
3 files changed
+24
-24
No files matched your search
@@ -1051,26 +1051,26 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
|
||||
while ( 1 ) {
|
||||
prev = text_p; // so we can unget
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token ) {
|
||||
if ( !token[0] ) {
|
||||
break;
|
||||
}
|
||||
if ( !Q_stricmp( token, "footsteps" ) ) {
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token ) {
|
||||
if ( !token[0] ) {
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
} else if ( !Q_stricmp( token, "headoffset" ) ) {
|
||||
for ( i = 0 ; i < 3 ; i++ ) {
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token ) {
|
||||
if ( !token[0] ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
} else if ( !Q_stricmp( token, "sex" ) ) {
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token ) {
|
||||
if ( !token[0] ) {
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
@@ -1089,7 +1089,7 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
|
||||
for ( i = 0 ; i < MAX_ANIMATIONS ; i++ ) {
|
||||
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token ) {
|
||||
if ( !token[0] ) {
|
||||
break;
|
||||
}
|
||||
animations[i].firstFrame = atoi( token );
|
||||
@@ -1102,19 +1102,19 @@ static qboolean UI_ParseAnimationFile( const char *filename, animation_t *animat
|
||||
}
|
||||
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token ) {
|
||||
if ( !token[0] ) {
|
||||
break;
|
||||
}
|
||||
animations[i].numFrames = atoi( token );
|
||||
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token ) {
|
||||
if ( !token[0] ) {
|
||||
break;
|
||||
}
|
||||
animations[i].loopFrames = atoi( token );
|
||||
|
||||
token = COM_Parse( &text_p );
|
||||
if ( !token ) {
|
||||
if ( !token[0] ) {
|
||||
break;
|
||||
}
|
||||
fps = atof( token );
|
||||
|
||||
Reference in new issue
Block a user