diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_draw.c | 3 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 3 | ||||
-rw-r--r-- | src/cgame/cg_players.c | 6 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 56bec3df..36e49f6f 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -982,7 +982,8 @@ static void CG_DrawUsableBuildable( rectDef_t *rect, qhandle_t shader, vec4_t co es = &cg_entities[ trace.entityNum ].currentState; - if( es->eType == ET_BUILDABLE && BG_FindUsableForBuildable( es->modelindex ) ) + if( es->eType == ET_BUILDABLE && BG_FindUsableForBuildable( es->modelindex ) && + cg.predictedPlayerState.stats[ STAT_PTEAM ] == BG_FindTeamForBuildable( es->modelindex ) ) { //hack to prevent showing the usable buildable when you aren't carrying an energy weapon if( ( es->modelindex == BA_H_REACTOR || es->modelindex == BA_H_REPEATER ) && diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index b56a1a40..1ae81676 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -879,6 +879,9 @@ static void CG_CEntityPVSEnter( centity_t *cent ) cent->buildablePS = NULL; cent->entityPS = NULL; + + //make sure entities entering the PVS don't get stale animation data + memset( ¢->lerpFrame, 0, sizeof( lerpFrame_t ) ); } diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c index a48f8ce6..78161b6a 100644 --- a/src/cgame/cg_players.c +++ b/src/cgame/cg_players.c @@ -1490,6 +1490,12 @@ static void CG_PlayerUpgrades( centity_t *cent, refEntity_t *torso ) cent->jetPackPS = NULL; } } + else if( cent->jetPackPS != NULL ) + { + CG_DestroyParticleSystem( cent->jetPackPS ); + cent->jetPackState = JPS_OFF; + cent->jetPackPS = NULL; + } } |