Skip to content

Commit

Permalink
More bug fixes for Wraith.
Browse files Browse the repository at this point in the history
  • Loading branch information
enneract committed Jun 26, 2015
1 parent 7a9d256 commit 1895729
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/cgame/cg_draw.c
Expand Up @@ -4043,7 +4043,7 @@ static void CG_DrawHealthBars( void )
cent = cg_entities + cg.snap->entities[ i ].number;
es = &cent->currentState;

if( es->eFlags & ( EF_DEAD | EF_NODRAW ) )
if( es->eFlags & ( EF_DEAD | EF_NODRAW | EF_WARPING ) )
continue;

switch( es->eType )
Expand Down
5 changes: 3 additions & 2 deletions src/cgame/cg_event.c
Expand Up @@ -1177,8 +1177,9 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
break;

case EV_BLEED:
if( cg_bleedSelfWounds.integer ||
cent->currentState.number != cg.snap->ps.clientNum )
if( !warpingEnemyWraith &&
( cg_bleedSelfWounds.integer ||
cent->currentState.number != cg.snap->ps.clientNum ) )
{
particleSystem_t *ps = NULL;
if( ci->team == TEAM_ALIENS )
Expand Down
4 changes: 2 additions & 2 deletions src/cgame/cg_players.c
Expand Up @@ -1898,8 +1898,8 @@ void CG_Player( centity_t *cent )
return;

if( ( es->eFlags & EF_WARPING ) &&
( cgs.clientinfo[ es->number ].team != cg.snap->ps.stats[ STAT_TEAM ] ||
cg.snap->ps.stats[ STAT_TEAM ] == TEAM_NONE ) )
( cgs.clientinfo[ es->number ].team != cg.snap->ps.stats[ STAT_TEAM ] &&
cg.snap->ps.stats[ STAT_TEAM ] != TEAM_NONE ) )
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/cgame/cg_scanner.c
Expand Up @@ -58,7 +58,7 @@ void CG_UpdateEntityPositions( void )
{
cent = &cg_entities[ cg.snap->entities[ i ].number ];

if( cent->currentState.eFlags & EF_NODRAW )
if( cent->currentState.eFlags & EF_WARPING )
{
continue;
}
Expand Down
7 changes: 4 additions & 3 deletions src/game/g_active.c
Expand Up @@ -1471,6 +1471,7 @@ void ClientThink_real( gentity_t *ent )
int msec;
usercmd_t *ucmd;
int i;
float modifier = 1.0f;

client = ent->client;

Expand Down Expand Up @@ -1596,7 +1597,6 @@ void ClientThink_real( gentity_t *ent )
int i, num;
int count, interval;
vec3_t range, mins, maxs;
float modifier = 1.0f;

VectorSet( range, REGEN_BOOST_RANGE, REGEN_BOOST_RANGE,
REGEN_BOOST_RANGE );
Expand Down Expand Up @@ -1670,9 +1670,10 @@ void ClientThink_real( gentity_t *ent )
}

if( client->ps.weapon == WP_ALEVEL1 &&
client->lastWarpTime + LEVEL1_WARP_REGEN_DELAY <= level.time )
client->lastWarpTime + LEVEL1_WARP_REGEN_DELAY <= level.time &&
G_Overmind( ) )
{
client->ps.stats[ STAT_MISC ] += msec * LEVEL1_WARP_REGEN_RATE;
client->ps.stats[ STAT_MISC ] += msec * LEVEL1_WARP_REGEN_RATE * modifier;

if( client->ps.stats[ STAT_MISC ] > LEVEL1_WARP_TIME )
{
Expand Down
6 changes: 6 additions & 0 deletions src/game/g_combat.c
Expand Up @@ -1575,6 +1575,9 @@ qboolean G_SelectiveRadiusDamage( vec3_t origin, gentity_t *attacker, float dama
if( !ent->takedamage )
continue;

if( ent->s.eFlags & EF_WARPING )
continue;

if( ent->flags & FL_NOTARGET )
continue;

Expand Down Expand Up @@ -1692,6 +1695,9 @@ qboolean G_RadiusDamage( vec3_t origin, gentity_t *attacker, float damage,
if( ent == ignore )
continue;

if( ent->s.eFlags & EF_WARPING )
continue;

if( !ent->takedamage )
continue;

Expand Down

0 comments on commit 1895729

Please sign in to comment.