mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Should hopefully fix the MD2 crash reported
I wasn't able to replicate it personally, but this should hopefully avoid it crashing where the RPT given pointed out.
This commit is contained in:
parent
0cd1ae5b2b
commit
23b8646cbd
1 changed files with 5 additions and 0 deletions
|
|
@ -1208,6 +1208,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;
|
||||||
|
|
@ -1239,6 +1240,10 @@ 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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue