From: vortex Date: Tue, 24 Apr 2012 19:05:21 +0000 (+0000) Subject: R_MeshQueue_AddTransparent: Switch checks for RENDER_NODEPTHTEST and RENDER_WORLDOBJE... X-Git-Tag: xonotic-v0.8.0~96^2~226 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=80145244baab428553c505969a0258419e9ec918;p=xonotic%2Fdarkplaces.git R_MeshQueue_AddTransparent: Switch checks for RENDER_NODEPTHTEST and RENDER_WORLDOBJECT so RENDER_WORLDOBJECT keeps it's sorting index even if have RENDER_NODEPTHTEST. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11812 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rsurf.c b/gl_rsurf.c index 2d0f4795..123e12fe 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1535,7 +1535,7 @@ void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surface center[1] += r_refdef.view.forward[1]*ent->transparent_offset; center[2] += r_refdef.view.forward[2]*ent->transparent_offset; } - R_MeshQueue_AddTransparent((rsurface.texture->currentmaterialflags & MATERIALFLAG_NODEPTHTEST) ? MESHQUEUE_SORT_HUD : ((rsurface.entity->flags & RENDER_WORLDOBJECT) ? MESHQUEUE_SORT_SKY : MESHQUEUE_SORT_DISTANCE), center, R_Q1BSP_DrawLight_TransparentCallback, ent, surface - rsurface.modelsurfaces, rsurface.rtlight); + R_MeshQueue_AddTransparent((rsurface.entity->flags & RENDER_WORLDOBJECT) ? MESHQUEUE_SORT_SKY : ((rsurface.texture->currentmaterialflags & MATERIALFLAG_NODEPTHTEST) ? MESHQUEUE_SORT_HUD : MESHQUEUE_SORT_DISTANCE), center, R_Q1BSP_DrawLight_TransparentCallback, ent, surface - rsurface.modelsurfaces, rsurface.rtlight); } continue; } diff --git a/r_sprites.c b/r_sprites.c index 9ab013f3..2695c39f 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_NODEPTHTEST) ? MESHQUEUE_SORT_HUD : ((ent->flags & RENDER_WORLDOBJECT) ? MESHQUEUE_SORT_SKY : MESHQUEUE_SORT_DISTANCE), org, R_Model_Sprite_Draw_TransparentCallback, ent, 0, rsurface.rtlight); + R_MeshQueue_AddTransparent((ent->flags & RENDER_WORLDOBJECT) ? MESHQUEUE_SORT_SKY : ((ent->flags & RENDER_NODEPTHTEST) ? MESHQUEUE_SORT_HUD : MESHQUEUE_SORT_DISTANCE), org, R_Model_Sprite_Draw_TransparentCallback, ent, 0, rsurface.rtlight); }