X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fpicomodel%2Fpm_obj.c;h=32bdbd258213588c314d24a5c2f374d090ac4f3b;hb=refs%2Fmerge-requests%2F107%2Fhead;hp=24f3ee8ac6ad7cc3e23046c377d586a70b4288cc;hpb=02a51890a3d97a0e937fbb11071cf7c41cc00aa9;p=xonotic%2Fnetradiant.git diff --git a/libs/picomodel/pm_obj.c b/libs/picomodel/pm_obj.c index 24f3ee8a..32bdbd25 100644 --- a/libs/picomodel/pm_obj.c +++ b/libs/picomodel/pm_obj.c @@ -524,8 +524,9 @@ static picoModel_t *_obj_load( PM_PARAMS_LOAD ){ newSurface = PicoNewSurface( model ); \ if ( newSurface == NULL ) { \ _obj_error_return( "Error allocating surface" ); } \ - /* reset face index for surface */ \ + /* reset face index and vertex index for surface */ \ curFace = 0; \ + curVertex = 0; \ /* if we can, assign the previous shader to this surface */ \ if ( curSurface ) { \ PicoSetSurfaceShader( newSurface, curSurface->shader ); } \ @@ -540,7 +541,7 @@ static picoModel_t *_obj_load( PM_PARAMS_LOAD ){ /* helper */ #define _obj_error_return( m ) \ { \ - _pico_printf( PICO_ERROR,"%s in OBJ, line %d.",m,p->curLine ); \ + _pico_printf( PICO_ERROR, "%s in OBJ %s, line %d.", m, model->fileName, p->curLine ); \ _pico_free_parser( p ); \ FreeObjVertexData( vertexData ); \ PicoFreeModel( model ); \