From cad03b9d84bb4c4a4bf4783beeb5d1dd2e435b43 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 27 Apr 2001 14:45:29 +0000 Subject: Abstracted the buildable renderer a bit and added preliminary animation routines --- src/cgame/cg_ents.c | 90 ----------------------------------------------------- 1 file changed, 90 deletions(-) (limited to 'src/cgame/cg_ents.c') diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 9b8c10e5..66e6e8f9 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -370,96 +370,6 @@ static void CG_Item( centity_t *cent ) { } -/* -================== -CG_Buildable -================== -*/ -static void CG_Buildable( centity_t *cent ) { - refEntity_t ent; - refEntity_t ent2; - entityState_t *es; - gitem_t *item; - int msec; - float frac; - float scale; - - es = ¢->currentState; - if ( es->modelindex >= bg_numItems ) { - CG_Error( "Bad item index %i on entity", es->modelindex ); - } - - //add creep - if( es->modelindex2 == BIT_DROIDS ) - CG_Creep( cent ); - - // if set to invisible, skip - if ( !es->modelindex || ( es->eFlags & EF_NODRAW ) ) { - return; - } - - item = &bg_itemlist[ es->modelindex ]; - - memset (&ent, 0, sizeof(ent)); - - VectorCopy( es->angles, cent->lerpAngles ); - AnglesToAxis( cent->lerpAngles, ent.axis ); - - ent.hModel = cg_items[es->modelindex].models[0]; - - VectorCopy( cent->lerpOrigin, ent.origin); - VectorCopy( cent->lerpOrigin, ent.oldorigin); - - ent.nonNormalizedAxes = qfalse; - - // if just respawned, slowly scale up - msec = cg.time - cent->miscTime; - if ( msec >= 0 && msec < ITEM_SCALEUP_TIME ) { - frac = (float)msec / ITEM_SCALEUP_TIME; - VectorScale( ent.axis[0], frac, ent.axis[0] ); - VectorScale( ent.axis[1], frac, ent.axis[1] ); - VectorScale( ent.axis[2], frac, ent.axis[2] ); - ent.nonNormalizedAxes = qtrue; - } else { - frac = 1.0; - } - - - //TA: might be useful later: - // items without glow textures need to keep a minimum light value - // so they are always visible - /*if ( ( item->giType == IT_WEAPON ) || - ( item->giType == IT_ARMOR ) ) { - ent.renderfx |= RF_MINLIGHT; - }*/ - - //turret barrel bit - if( cg_items[ es->modelindex ].models[ 1 ] != 0 ) - { - vec3_t turretOrigin; - - memset( &ent2, 0, sizeof( ent2 ) ); - - AnglesToAxis( es->angles2, ent2.axis ); - - ent2.hModel = cg_items[ es->modelindex ].models[ 1 ]; - - VectorCopy( cent->lerpOrigin, turretOrigin ); - turretOrigin[ 2 ] += 5; - - VectorCopy( turretOrigin, ent2.origin ); - VectorCopy( turretOrigin, ent2.oldorigin ); - - ent2.nonNormalizedAxes = qfalse; - - trap_R_AddRefEntityToScene( &ent2 ); - } - - // add to refresh list - trap_R_AddRefEntityToScene(&ent); -} - - //============================================================================ /* -- cgit