]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
made weapon only 50% invisible in Transfusion with the invisibility powerup, and...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 11 Oct 2003 03:11:49 +0000 (03:11 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 11 Oct 2003 03:11:49 +0000 (03:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3567 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index b57f4507ea86457b4d4be696451a8d9cb0e6f78b..ace38eedc93f5a07c1a068538016cbb0ea305bc2 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -499,7 +499,7 @@ void CL_LinkNetworkEntity(entity_t *e)
                        return;
                if (e->render.flags & RENDER_VIEWMODEL)
                {
-                       if (cl.stats[STAT_HEALTH] <= 0 || !r_drawviewmodel.integer || chase_active.integer || envmap || (cl.items & IT_INVISIBILITY))
+                       if (!r_drawviewmodel.integer || chase_active.integer || envmap)
                                return;
                        if (cl.viewentity)
                                CL_LinkNetworkEntity(cl_entities + cl.viewentity);
@@ -846,6 +846,15 @@ static void CL_RelinkNetworkEntities(void)
        ent->state_current.modelindex = cl.stats[STAT_WEAPON];
        ent->state_current.frame = cl.stats[STAT_WEAPONFRAME];
        ent->state_current.flags = RENDER_VIEWMODEL;
+       if (cl.stats[STAT_HEALTH] <= 0)
+               ent->state_current.modelindex = 0;
+       else if (cl.items & IT_INVISIBILITY)
+       {
+               if (gamemode == GAME_TRANSFUSION)
+                       ent->state_current.alpha = 0.5;
+               else
+                       ent->state_current.modelindex = 0;
+       }
 
        // start on the entity after the world
        entitylinkframenumber++;