Skip to content
Snippets Groups Projects
Commit 5502242e authored by toaster's avatar toaster
Browse files

MD2 crash fix.

parent 008f5765
No related branches found
No related tags found
No related merge requests found
...@@ -1277,6 +1277,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr) ...@@ -1277,6 +1277,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
// MD2 colormap fix // MD2 colormap fix
// colormap test // colormap test
if (spr->mobj->subsector)
{ {
sector_t *sector = spr->mobj->subsector->sector; sector_t *sector = spr->mobj->subsector->sector;
UINT8 lightlevel = 255; UINT8 lightlevel = 255;
...@@ -1308,6 +1309,8 @@ void HWR_DrawMD2(gr_vissprite_t *spr) ...@@ -1308,6 +1309,8 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
else else
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false); Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false);
} }
else
Surf.FlatColor.rgba = 0xFFFFFFFF;
// Look at HWR_ProjectSprite for more // Look at HWR_ProjectSprite for more
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment