engine: common: imagelib: fix loading cubemaps
Loop break was a bug that was added after refactoring imagelib loader. In fact, it was mindlessly copypasted from old code, where same break was used to quickly exit from inner format bruteforcing loop, than outer cubemap loading loop.
This commit is contained in:
parent
e673fe9a02
commit
1caa276531
1 changed files with 3 additions and 4 deletions
|
@ -321,10 +321,9 @@ rgbdata_t *FS_LoadImage( const char *filename, const byte *buffer, size_t size )
|
||||||
{
|
{
|
||||||
for( i = 0; i < 6; i++ )
|
for( i = 0; i < 6; i++ )
|
||||||
{
|
{
|
||||||
if( Image_ProbeLoad( extfmt, loadname, cmap->type[i].suf, cmap->type[i].hint ) &&
|
if( Image_ProbeLoad( extfmt, loadname, cmap->type[i].suf, cmap->type[i].hint ))
|
||||||
FS_AddSideToPack( cmap->type[i].flags )) // process flags to flip some sides
|
|
||||||
{
|
{
|
||||||
break;
|
FS_AddSideToPack( cmap->type[i].flags );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( image.num_sides != i + 1 ) // check side
|
if( image.num_sides != i + 1 ) // check side
|
||||||
|
@ -339,7 +338,7 @@ rgbdata_t *FS_LoadImage( const char *filename, const byte *buffer, size_t size )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure what all sides is loaded
|
// make sure that all sides is loaded
|
||||||
if( image.num_sides != 6 )
|
if( image.num_sides != 6 )
|
||||||
{
|
{
|
||||||
// unexpected errors ?
|
// unexpected errors ?
|
||||||
|
|
Loading…
Add table
Reference in a new issue