Fix 'missing token' in parsers for animations.cfg
This commit is contained in:
parent
6e340f9a5b
commit
d58234a6c7
3 changed files with 24 additions and 24 deletions
|
@ -964,26 +964,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;
|
||||
|
@ -1002,7 +1002,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 );
|
||||
|
@ -1015,19 +1015,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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue