Skip to content
Snippets Groups Projects
Commit 9f0aacb0 authored by Sryder's avatar Sryder
Browse files

MD2 Texture load fix

Fixes MD2's using sprites on the first frame when they're loaded.
parent 652f3395
No related branches found
No related tags found
No related merge requests found
...@@ -1179,6 +1179,8 @@ void HWR_DrawMD2(gr_vissprite_t *spr) ...@@ -1179,6 +1179,8 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
if (!gpatch || !gpatch->mipmap.grInfo.format || !gpatch->mipmap.downloaded) if (!gpatch || !gpatch->mipmap.grInfo.format || !gpatch->mipmap.downloaded)
md2_loadTexture(md2); md2_loadTexture(md2);
gpatch = md2->grpatch; // Load it again, because it isn't being loaded into gpatch after md2_loadtexture...
if (gpatch && gpatch->mipmap.grInfo.format) // else if meant that if a texture couldn't be loaded, it would just end up using something else's texture if (gpatch && gpatch->mipmap.grInfo.format) // else if meant that if a texture couldn't be loaded, it would just end up using something else's texture
{ {
// This is safe, since we know the texture has been downloaded // This is safe, since we know the texture has been downloaded
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment