Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/cgame/cg_q3f_grenades.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,11 @@ static int NailEndTime( struct gnail *nail, float zpos, int parentnum )
end[0] = nail->xvel;
end[1] = nail->yvel;
end[2] = 0;
VectorScale( end, 20000 * Q3F_NAILSPEED / 1000 , end ); // 20 seconds travel
VectorScale( end, 500 * Q3F_NAILSPEED / 1000 , end ); // 20 seconds travel - Default; Tulkas - adjusted to 1 second travel duration to reduce nail spam
VectorAdd( start, end, end );

CG_Trace( &tr, start, NULL, NULL, end, parentnum, MASK_SHOT );
return( nail->starttime + 20000 * tr.fraction );
return( nail->starttime + 500 * tr.fraction );
}

static int InitNailArray( centity_t *cent )
Expand Down
6 changes: 6 additions & 0 deletions code/game/g_q3f_grenades.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,12 @@ static void NailThink( gentity_t *grenade )
ptr = array + index;
if( !ptr->starttime || ptr->starttime > level.time )
continue;
if( level.time - ptr->starttime >= 500 )
{
ptr->starttime = 0; // expire nail
*(bitptr + (index>>3)) &= ~(1<<(index&7)); // tell client it's gone
continue;
}
start[0] = ptr->xpos;
start[1] = ptr->ypos;
start[2] = grenade->r.currentOrigin[2];
Expand Down
Loading