From 9f0aacb059b4fe2eb631b3604c16e37fe0d3eb47 Mon Sep 17 00:00:00 2001 From: Sryder13 Date: Sun, 30 Mar 2014 17:45:58 +0100 Subject: [PATCH] MD2 Texture load fix Fixes MD2's using sprites on the first frame when they're loaded. --- src/hardware/hw_md2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 6d3c52b0..0ab58c84 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1179,6 +1179,8 @@ void HWR_DrawMD2(gr_vissprite_t *spr) if (!gpatch || !gpatch->mipmap.grInfo.format || !gpatch->mipmap.downloaded) 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 { // This is safe, since we know the texture has been downloaded