summaryrefslogtreecommitdiff
path: root/src/cgame/cg_ents.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2001-04-27 14:45:29 +0000
committerTim Angus <tim@ngus.net>2001-04-27 14:45:29 +0000
commitcad03b9d84bb4c4a4bf4783beeb5d1dd2e435b43 (patch)
treef429e8c69cf62cfa81b57a705d3789448907ca39 /src/cgame/cg_ents.c
parenta7627e5694752c629bc5beeb39a7fa74bba8a8e5 (diff)
Abstracted the buildable renderer a bit and added preliminary animation routines
Diffstat (limited to 'src/cgame/cg_ents.c')
-rw-r--r--src/cgame/cg_ents.c90
1 files changed, 0 insertions, 90 deletions
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 = &cent->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);
-}
-
-
//============================================================================
/*