mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-27 22:42:29 +00:00
Update models_obj.cpp
This commit is contained in:
parent
27cf152438
commit
d1ea33a815
1 changed files with 2 additions and 2 deletions
|
@ -636,7 +636,7 @@ void FOBJModel::RenderFrame(FModelRenderer *renderer, FGameTexture * skin, int f
|
|||
OBJSurface *surf = &surfaces[i];
|
||||
|
||||
FGameTexture *userSkin = skin;
|
||||
if (!userSkin)
|
||||
if (!userSkin && curSpriteMDLFrame)
|
||||
{
|
||||
int ssIndex = i + curMDLIndex * MD3_MAX_SURFACES;
|
||||
if (i < MD3_MAX_SURFACES && curSpriteMDLFrame->surfaceskinIDs[ssIndex].isValid())
|
||||
|
@ -671,7 +671,7 @@ void FOBJModel::AddSkins(uint8_t* hitlist)
|
|||
for (size_t i = 0; i < surfaces.Size(); i++)
|
||||
{
|
||||
size_t ssIndex = i + curMDLIndex * MD3_MAX_SURFACES;
|
||||
if (i < MD3_MAX_SURFACES && curSpriteMDLFrame->surfaceskinIDs[ssIndex].isValid())
|
||||
if (curSpriteMDLFrame && i < MD3_MAX_SURFACES && curSpriteMDLFrame->surfaceskinIDs[ssIndex].isValid())
|
||||
{
|
||||
// Precache skins manually reassigned by the user.
|
||||
// On OBJs with lots of skins, such as Doom map OBJs exported from GZDB,
|
||||
|
|
Loading…
Reference in a new issue