Skip to content
Merged
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
7 changes: 3 additions & 4 deletions src/engine/renderer/tr_bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2593,22 +2593,21 @@ might still appear at that side.
int R_TryStitchingPatch( int grid1num )
{
int j, numstitches;
srfGridMesh_t *grid1, *grid2;

numstitches = 0;
grid1 = ( srfGridMesh_t * ) s_worldData.surfaces[ grid1num ].data;

for ( j = 0; j < s_worldData.numSurfaces; j++ )
{
//
grid2 = ( srfGridMesh_t * ) s_worldData.surfaces[ j ].data;
srfGridMesh_t *grid2 = ( srfGridMesh_t * ) s_worldData.surfaces[ j ].data;

// if this surface is not a grid
if ( grid2->surfaceType != surfaceType_t::SF_GRID )
{
continue;
}

srfGridMesh_t *grid1 = ( srfGridMesh_t * ) s_worldData.surfaces[ grid1num ].data;

// grids in the same LOD group should have the exact same lod radius
if ( grid1->lodRadius != grid2->lodRadius )
{
Expand Down
6 changes: 3 additions & 3 deletions src/engine/renderer/tr_light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@ float R_InterpolateLightGrid( world_t *w, int from[3], int to[3],

for( x = from[ 0 ], xFactor = factors[ 0 ]; x <= to[ 0 ];
x++, xFactor++ ) {
if( x < 0 || x > w->lightGridBounds[ 0 ] )
if( x < 0 || x >= w->lightGridBounds[ 0 ] )
continue;

for( y = from[ 1 ], yFactor = factors[ 1 ]; y <= to[ 1 ];
y++, yFactor++ ) {
if( y < 0 || y > w->lightGridBounds[ 1 ] )
if( y < 0 || y >= w->lightGridBounds[ 1 ] )
continue;

for( z = from[ 2 ], zFactor = factors[ 2 ]; z <= to[ 2 ];
z++, zFactor++ ) {
if( z < 0 || z > w->lightGridBounds[ 2 ] )
if( z < 0 || z >= w->lightGridBounds[ 2 ] )
continue;

gp1 = w->lightGridData1 + x * gridStep[ 0 ] + y * gridStep[ 1 ] + z * gridStep[ 2 ];
Expand Down
2 changes: 1 addition & 1 deletion src/engine/server/sv_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void SendConfigStringToClient( int cs, client_t *cl )

*out++ = c;

if ( !*in )
if ( !c )
{
break;
}
Expand Down