diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_buildable.c | 6 | ||||
-rw-r--r-- | src/cgame/cg_draw.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 3 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 23 |
5 files changed, 6 insertions, 30 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 5b2582c..e2e33f8 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -709,7 +709,7 @@ static void CG_BuildableParticleEffects( centity_t *cent ) { entityState_t *es = ¢->currentState; team_t team = BG_Buildable( es->modelindex )->team; - int health = es->generic1; + int health = es->constantLight; float healthFrac = (float)health / BG_Buildable( es->modelindex )->health; if( !( es->eFlags & EF_B_SPAWNED ) ) @@ -1055,7 +1055,7 @@ static void CG_BuildableStatusDisplay( centity_t *cent ) return; } - health = es->generic1; + health = es->constantLight; healthScale = (float)health / BG_Buildable( es->modelindex )->health; if( health > 0 && healthScale < 0.01f ) @@ -1535,7 +1535,7 @@ void CG_Buildable( centity_t *cent ) trap_S_AddLoopingSound( es->number, cent->lerpOrigin, vec3_origin, weapon->readySound ); } - health = es->generic1; + health = es->constantLight; if( health < cent->lastBuildableHealth && ( es->eFlags & EF_B_SPAWNED ) ) diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 4e2ba77..1d18023 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -4072,7 +4072,7 @@ static void CG_DrawHealthBars( void ) if( CG_PlayerIsBuilder( es->modelindex ) ) continue; - bar->value = es->generic1; + bar->value = es->constantLight; bar->max = BG_Buildable( es->modelindex )->health; BG_BuildableBoundingBox( es->modelindex, mins, maxs ); break; diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index a9663ad..13e0470 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -236,7 +236,8 @@ static void CG_EntityEffects( centity_t *cent ) // constant light glow - if ( cent->currentState.constantLight ) + if ( cent->currentState.eType == ET_MOVER && + cent->currentState.constantLight ) { int cl; int i, r, g, b; diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 7721e45..b405cc6 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1072,8 +1072,6 @@ typedef struct int itemPickupBlendTime; // the pulse around the crosshair is timed seperately int weaponSelectTime; - int weaponAnimation; - int weaponAnimationTime; // blend blobs float damageTime; diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 7fb68c9..f57eb41 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -746,27 +746,6 @@ static void CG_SetWeaponLerpFrameAnimation( weapon_t weapon, lerpFrame_t *lf, in } /* -=============== -CG_WeaponAnimation -=============== -*/ -static void CG_WeaponAnimation( centity_t *cent, int *old, int *now, float *backLerp ) -{ - lerpFrame_t *lf = ¢->pe.weapon; - entityState_t *es = ¢->currentState; - - // see if the animation sequence is switching - if( es->weaponAnim != lf->animationNumber || !lf->animation ) - CG_SetWeaponLerpFrameAnimation( es->weapon, lf, es->weaponAnim ); - - CG_RunLerpFrame( lf, 1.0f ); - - *old = lf->oldFrame; - *now = lf->frame; - *backLerp = lf->backlerp; -} - -/* ================= CG_MapTorsoToWeaponFrame @@ -1073,8 +1052,6 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent gun.customShader = cgs.media.invisibleShaderTeam; } - CG_WeaponAnimation( cent, &gun.oldframe, &gun.frame, &gun.backlerp ); - trap_R_AddRefEntityToScene( &gun ); if( !ps ) |