Skip to content

Commit

Permalink
revert RT_BEAM changes
Browse files Browse the repository at this point in the history
the extra iteration is intentional to seal the tri strip
  • Loading branch information
Razish committed Feb 17, 2024
1 parent 1b32f04 commit 3585e71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/rd-vanilla/tr_surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ static void RB_SurfaceBeam( void )
}

qglBegin( GL_TRIANGLE_STRIP );
for ( i = 0; i < NUM_BEAM_SEGS; i++ ) {
for ( i = 0; i <= NUM_BEAM_SEGS; i++ ) {
qglVertex3fv( start_points[ i % NUM_BEAM_SEGS] );
qglVertex3fv( end_points[ i % NUM_BEAM_SEGS] );
}
Expand Down
2 changes: 1 addition & 1 deletion codemp/rd-rend2/tr_surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static void RB_SurfaceBeam( void )
tess.minIndex = 0;
tess.maxIndex = 0;

for ( i = 0; i < NUM_BEAM_SEGS; i++ ) {
for ( i = 0; i <= NUM_BEAM_SEGS; i++ ) {
VectorCopy(start_points[ i % NUM_BEAM_SEGS ], tess.xyz[tess.numVertexes++]);
VectorCopy(end_points [ i % NUM_BEAM_SEGS ], tess.xyz[tess.numVertexes++]);
}
Expand Down
2 changes: 1 addition & 1 deletion codemp/rd-vanilla/tr_surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static void RB_SurfaceBeam( void )
qglColor3f( 1, 0, 0 );

qglBegin( GL_TRIANGLE_STRIP );
for ( i = 0; i < NUM_BEAM_SEGS; i++ ) {
for ( i = 0; i <= NUM_BEAM_SEGS; i++ ) {
qglVertex3fv( start_points[ i % NUM_BEAM_SEGS] );
qglVertex3fv( end_points[ i % NUM_BEAM_SEGS] );
}
Expand Down

0 comments on commit 3585e71

Please sign in to comment.