From 90ab06407913c43226790d1d6bf6770769fdb3fd Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 11 Oct 2003 03:11:49 +0000 Subject: [PATCH] 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 --- cl_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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++; -- 2.39.2