mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-28 06:32:29 +00:00
- fixed some crash issues with recent changes.
This commit is contained in:
parent
92e2ce2aef
commit
87d27b8db3
2 changed files with 6 additions and 2 deletions
|
@ -1077,8 +1077,12 @@ void gl_RenderHUDModel(DPSprite *psp, float ofsX, float ofsY)
|
|||
|
||||
bool gl_IsHUDModelForPlayerAvailable (player_t * player)
|
||||
{
|
||||
if (player == nullptr || player->ReadyWeapon == nullptr)
|
||||
return false;
|
||||
|
||||
DPSprite *psp = player->FindPSprite(PSP_WEAPON);
|
||||
if ( (player == nullptr) || (player->ReadyWeapon == nullptr) || (psp->GetState() == nullptr) )
|
||||
|
||||
if (psp == nullptr || psp->GetState() == nullptr)
|
||||
return false;
|
||||
|
||||
FState* state = psp->GetState();
|
||||
|
|
|
@ -240,7 +240,7 @@ void GLSprite::Draw(int pass)
|
|||
secplane_t *lowplane = i == (*lightlist).Size() - 1 ? &bottomp : &(*lightlist)[i + 1].plane;
|
||||
|
||||
int thislight = (*lightlist)[i].caster != NULL ? gl_ClampLight(*(*lightlist)[i].p_lightlevel) : lightlevel;
|
||||
int thisll = (byte)gl_CheckSpriteGlow(actor->Sector, thislight, actor->InterpolatedPosition(r_TicFracF));
|
||||
int thisll = actor == nullptr? thislight : (uint8_t)gl_CheckSpriteGlow(actor->Sector, thislight, actor->InterpolatedPosition(r_TicFracF));
|
||||
|
||||
FColormap thiscm;
|
||||
thiscm.FadeColor = Colormap.FadeColor;
|
||||
|
|
Loading…
Reference in a new issue