]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix two crashes introduced by vortex ( r11822 ) on sprites and nomodels
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 15 Jun 2012 02:14:09 +0000 (02:14 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 15 Jun 2012 07:55:39 +0000 (09:55 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11828 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=5aefe7c200a0278927239cdd4eb56391a66056f1

gl_rmain.c
r_sprites.c

index fe0fa0f589321eaf49ee50b22d183eef1b2b6ed2..9499f16c8611554e532c5a09f40c1e1b87a71ede 100644 (file)
@@ -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);
 }
index cf57c30ca34ffef8015858dfd25fcd703cf8c463..a45a3e73b5ddaefe8a3535b906903033b143c155 100644 (file)
@@ -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);
 }