diff options
-rw-r--r-- | src/cgame/cg_draw.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
-rw-r--r-- | src/cgame/cg_players.c | 4 | ||||
-rw-r--r-- | src/game/g_weapon.c | 7 |
4 files changed, 11 insertions, 4 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index f97bf9b6..0eab8bef 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2261,7 +2261,7 @@ static void CG_DrawLocation( rectDef_t *rect, float scale, int textalign, vec4_t float tx = rect->x, ty = rect->y; maxX = rect->x + rect->w; - locent = CG_GetLocation( &cg_entities[ cg.clientNum ] ); + locent = CG_GetPlayerLocation( ); if( locent ) location = CG_ConfigString( CS_LOCATIONS + locent->currentState.generic1 ); else diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 0169ff77..cb638702 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1663,7 +1663,7 @@ void CG_PrecacheClientInfo( class_t class, char *model, char *skin ); sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ); void CG_PlayerDisconnect( vec3_t org ); void CG_Bleed( vec3_t origin, vec3_t normal, int entityNum ); -centity_t *CG_GetLocation( centity_t *cent ); +centity_t *CG_GetPlayerLocation( void ); // // cg_buildable.c diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c index 8bd0457c..bd53eb20 100644 --- a/src/cgame/cg_players.c +++ b/src/cgame/cg_players.c @@ -2370,7 +2370,7 @@ void CG_PlayerDisconnect( vec3_t org ) } } -centity_t *CG_GetLocation( centity_t *cent ) +centity_t *CG_GetPlayerLocation( void ) { centity_t *eloc, *best; float bestlen, len; @@ -2379,7 +2379,7 @@ centity_t *CG_GetLocation( centity_t *cent ) best = NULL; bestlen = 3.0f * 8192.0f * 8192.0f; - VectorCopy( cent->lerpOrigin, origin ); + VectorCopy( cg.predictedPlayerState.origin, origin ); for( eloc = cg.locationHead; eloc; eloc = eloc->nextLocation ) { diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index beb91429..20666b50 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -247,6 +247,10 @@ static void BloodSpurt( gentity_t *attacker, gentity_t *victim, trace_t *tr ) if( !attacker->client ) return; + + if( victim->health <= 0 ) + return; + tent = G_TempEntity( tr->endpos, EV_MISSILE_HIT ); tent->s.otherEntityNum = victim->s.number; tent->s.eventParm = DirToByte( tr->plane.normal ); @@ -270,6 +274,9 @@ static void WideBloodSpurt( gentity_t *attacker, gentity_t *victim, trace_t *tr if( !attacker->client ) return; + if( victim->health <= 0 ) + return; + if( tr ) VectorSubtract( tr->endpos, victim->s.origin, normal ); else |