From 5aefe7c200a0278927239cdd4eb56391a66056f1 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 15 Jun 2012 02:14:09 +0000 Subject: [PATCH] fix two crashes introduced by vortex ( r11822 ) on sprites and nomodels git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11828 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 2 +- r_sprites.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index fe0fa0f5..9499f16c 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -7465,7 +7465,7 @@ void R_DrawNoModel(entity_render_t *ent) vec3_t org; Matrix4x4_OriginFromMatrix(&ent->matrix, org); if ((ent->flags & RENDER_ADDITIVE) || (ent->alpha < 1)) - R_MeshQueue_AddTransparent((ent->flags & RENDER_NODEPTHTEST) ? TRANSPARENTSORT_HUD : rsurface.texture->transparentsort, org, R_DrawNoModel_TransparentCallback, ent, 0, rsurface.rtlight); + R_MeshQueue_AddTransparent((ent->flags & RENDER_NODEPTHTEST) ? TRANSPARENTSORT_HUD : TRANSPARENTSORT_DISTANCE, org, R_DrawNoModel_TransparentCallback, ent, 0, rsurface.rtlight); else R_DrawNoModel_TransparentCallback(ent, rsurface.rtlight, 0, NULL); } diff --git a/r_sprites.c b/r_sprites.c index cf57c30c..a45a3e73 100644 --- a/r_sprites.c +++ b/r_sprites.c @@ -424,6 +424,6 @@ void R_Model_Sprite_Draw(entity_render_t *ent) return; Matrix4x4_OriginFromMatrix(&ent->matrix, org); - R_MeshQueue_AddTransparent((ent->flags & RENDER_WORLDOBJECT) ? TRANSPARENTSORT_SKY : (ent->flags & RENDER_NODEPTHTEST) ? TRANSPARENTSORT_HUD : rsurface.texture->transparentsort, org, R_Model_Sprite_Draw_TransparentCallback, ent, 0, rsurface.rtlight); + R_MeshQueue_AddTransparent((ent->flags & RENDER_WORLDOBJECT) ? TRANSPARENTSORT_SKY : (ent->flags & RENDER_NODEPTHTEST) ? TRANSPARENTSORT_HUD : TRANSPARENTSORT_DISTANCE, org, R_Model_Sprite_Draw_TransparentCallback, ent, 0, rsurface.rtlight); } -- 2.39.2