From: havoc Date: Fri, 15 Jun 2012 02:14:09 +0000 (+0000) Subject: fix two crashes introduced by vortex ( r11822 ) on sprites and nomodels X-Git-Tag: xonotic-v0.7.0~126 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7ae54d87c8df0f2c6068575c105e88feb8b4ad95;p=xonotic%2Fdarkplaces.git 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 ::stable-branch::merge=5aefe7c200a0278927239cdd4eb56391a66056f1 --- 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); }