mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- Fix gcc compile error
- Fix weapon null pointer crash
This commit is contained in:
parent
aaa00cbcb9
commit
801fbddd47
2 changed files with 3 additions and 3 deletions
|
@ -148,7 +148,7 @@ static bool CheckBBoxCircle(float *bbox, float x, float y, float radiusSquared)
|
|||
}
|
||||
|
||||
template<typename Callback>
|
||||
void BSPNodeWalkCircle(void *node, float x, float y, float radiusSquared, Callback &callback)
|
||||
void BSPNodeWalkCircle(void *node, float x, float y, float radiusSquared, const Callback &callback)
|
||||
{
|
||||
while (!((size_t)node & 1))
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ void BSPNodeWalkCircle(void *node, float x, float y, float radiusSquared, Callba
|
|||
}
|
||||
|
||||
template<typename Callback>
|
||||
void BSPWalkCircle(float x, float y, float radiusSquared, Callback &callback)
|
||||
void BSPWalkCircle(float x, float y, float radiusSquared, const Callback &callback)
|
||||
{
|
||||
if (level.nodes.Size() == 0)
|
||||
callback(&level.subsectors[0]);
|
||||
|
|
|
@ -420,7 +420,7 @@ void GLSceneDrawer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
|||
{
|
||||
if (gl_lights && GLRenderer->mLightCount && FixedColormap == CM_DEFAULT && gl_light_sprites)
|
||||
{
|
||||
FSpriteModelFrame *smf = gl_FindModelFrame(playermo->player->ReadyWeapon->GetClass(), psp->GetState()->sprite, psp->GetState()->GetFrame(), false);
|
||||
FSpriteModelFrame *smf = playermo->player->ReadyWeapon ? gl_FindModelFrame(playermo->player->ReadyWeapon->GetClass(), psp->GetState()->sprite, psp->GetState()->GetFrame(), false) : nullptr;
|
||||
if (smf)
|
||||
gl_SetDynModelLight(playermo, true);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue