]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix label sprites if r_waterstate.renderingscene
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Apr 2008 10:43:19 +0000 (10:43 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Apr 2008 10:43:19 +0000 (10:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8263 d7cf8633-e32d-0410-b094-e92efae38249

r_sprites.c

index f29765872bc6a805a4af5aef61b638d9efd2016f..444d1668d0190715ef83cd3a461e8b4eb71ef78e 100644 (file)
@@ -250,6 +250,9 @@ void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, const r
                // fixed HUD pixel size specified in sprite
                // honors scale
                // honors a global label scaling cvar
+       
+               if(r_waterstate.renderingscene) // labels are considered HUD items, and don't appear in reflections
+                       return;
 
                // See the R_TrackSprite definition for a reason for this copying
                VectorCopy(r_refdef.view.left, left);
@@ -271,6 +274,9 @@ void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, const r
                // honors a global label scaling cvar before the rounding
                // FIXME assumes that 1qu is 1 pixel in the sprite like in SPR32 format. Should not do that, but instead query the source image! This bug only applies to the roundtopixels case, though.
 
+               if(r_waterstate.renderingscene) // labels are considered HUD items, and don't appear in reflections
+                       return;
+
                // See the R_TrackSprite definition for a reason for this copying
                VectorCopy(r_refdef.view.left, left);
                VectorCopy(r_refdef.view.up, up);