light: handle bsp's with no textures
This commit is contained in:
parent
f2a57d5b71
commit
9e2d54a9af
|
|
@ -1749,6 +1749,8 @@ static const char *
|
|||
Face_TextureName(const bsp2_t *bsp, const bsp2_dface_t *face)
|
||||
{
|
||||
int texnum = bsp->texinfo[face->texinfo].miptex;
|
||||
if (!bsp->texdatasize)
|
||||
return "";
|
||||
const dmiptexlump_t *miplump = bsp->dtexdata.header;
|
||||
if (!miplump->dataofs[texnum])
|
||||
return ""; //sometimes the texture just wasn't written. including its name.
|
||||
|
|
|
|||
|
|
@ -148,6 +148,9 @@ Face_Contents(const bsp2_t *bsp, const bsp2_dface_t *face)
|
|||
if (!(bsp->texinfo[face->texinfo].flags & TEX_SPECIAL))
|
||||
return CONTENTS_SOLID;
|
||||
|
||||
if (!bsp->texdatasize)
|
||||
return CONTENTS_SOLID; // no textures in bsp
|
||||
|
||||
int texnum = bsp->texinfo[face->texinfo].miptex;
|
||||
const dmiptexlump_t *miplump = bsp->dtexdata.header;
|
||||
const miptex_t *miptex;
|
||||
|
|
|
|||
Loading…
Reference in New Issue