From 3585e7183cc1edf7c323b741ac5dac907477b673 Mon Sep 17 00:00:00 2001 From: Razish Date: Sun, 18 Feb 2024 01:31:22 +1100 Subject: [PATCH] revert RT_BEAM changes the extra iteration is intentional to seal the tri strip --- code/rd-vanilla/tr_surface.cpp | 2 +- codemp/rd-rend2/tr_surface.cpp | 2 +- codemp/rd-vanilla/tr_surface.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/rd-vanilla/tr_surface.cpp b/code/rd-vanilla/tr_surface.cpp index ddcef29214..1e51e71c90 100644 --- a/code/rd-vanilla/tr_surface.cpp +++ b/code/rd-vanilla/tr_surface.cpp @@ -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] ); } diff --git a/codemp/rd-rend2/tr_surface.cpp b/codemp/rd-rend2/tr_surface.cpp index 025e2574a4..95bb89c24e 100644 --- a/codemp/rd-rend2/tr_surface.cpp +++ b/codemp/rd-rend2/tr_surface.cpp @@ -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++]); } diff --git a/codemp/rd-vanilla/tr_surface.cpp b/codemp/rd-vanilla/tr_surface.cpp index 5fd11fb24f..3be021dce6 100644 --- a/codemp/rd-vanilla/tr_surface.cpp +++ b/codemp/rd-vanilla/tr_surface.cpp @@ -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] ); }