Skip to content

Commit

Permalink
drain fix tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
videoP committed May 29, 2024
1 parent 00f7ec4 commit a706c5d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions codemp/game/w_force.c
Original file line number Diff line number Diff line change
Expand Up @@ -2375,11 +2375,19 @@ int ForceShootDrain( gentity_t *self )
}
else
{//trace-line
VectorMA( center, 2048, forward, end );
if (g_tweakForce.integer & FT_FIXLINEDRAIN) {
vec3_t mins = { -6, -6, -6 }, maxs = { 6, 6, 6 };
VectorMA(center, MAX_DRAIN_DISTANCE, forward, end);
JP_Trace(&tr, center, mins, maxs, end, self->s.number, MASK_SHOT, qfalse, 0, 0);
}
else {
VectorMA(center, 2048, forward, end);
JP_Trace(&tr, center, vec3_origin, vec3_origin, end, self->s.number, MASK_SHOT, qfalse, 0, 0);
}

JP_Trace( &tr, center, vec3_origin, vec3_origin, end, self->s.number, MASK_SHOT, qfalse, 0, 0 );
if ( tr.entityNum == ENTITYNUM_NONE || tr.fraction == 1.0 || tr.allsolid || tr.startsolid || !g_entities[tr.entityNum].client || !g_entities[tr.entityNum].inuse )
{
self->client->ps.activeForcePass = 0; //Reset this visual
return 0;
}

Expand Down

0 comments on commit a706c5d

Please sign in to comment.