From: havoc Date: Sat, 11 Oct 2003 03:11:49 +0000 (+0000) Subject: made weapon only 50% invisible in Transfusion with the invisibility powerup, and... X-Git-Tag: xonotic-v0.1.0preview~6323 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=90ab06407913c43226790d1d6bf6770769fdb3fd;p=xonotic%2Fdarkplaces.git made weapon only 50% invisible in Transfusion with the invisibility powerup, and now being dead or invisible only affects the main viewmodel (not viewmodelforccient entities) to allow more flexibility in mods git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3567 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_main.c b/cl_main.c index b57f4507..ace38eed 100644 --- 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++;