minor tweak
This commit is contained in:
parent
158df04936
commit
86a8b5f1eb
|
|
@ -2227,8 +2227,6 @@ void EmitPatchSurface( entity_t *e, mapDrawSurface_t *ds ){
|
||||||
|
|
||||||
/* invert the surface if necessary */
|
/* invert the surface if necessary */
|
||||||
if ( ds->backSide || ds->shaderInfo->invert ) {
|
if ( ds->backSide || ds->shaderInfo->invert ) {
|
||||||
bspDrawVert_t *dv1, *dv2, temp;
|
|
||||||
|
|
||||||
/* walk the verts, flip the normal */
|
/* walk the verts, flip the normal */
|
||||||
for ( i = 0; i < ds->numVerts; i++ )
|
for ( i = 0; i < ds->numVerts; i++ )
|
||||||
vector3_negate( ds->verts[ i ].normal );
|
vector3_negate( ds->verts[ i ].normal );
|
||||||
|
|
@ -2238,11 +2236,8 @@ void EmitPatchSurface( entity_t *e, mapDrawSurface_t *ds ){
|
||||||
{
|
{
|
||||||
for ( i = 0; i < ( ds->patchWidth / 2 ); i++ )
|
for ( i = 0; i < ( ds->patchWidth / 2 ); i++ )
|
||||||
{
|
{
|
||||||
dv1 = &ds->verts[ j * ds->patchWidth + i ];
|
std::swap( ds->verts[ j * ds->patchWidth + i ],
|
||||||
dv2 = &ds->verts[ j * ds->patchWidth + ( ds->patchWidth - i - 1 ) ];
|
ds->verts[ j * ds->patchWidth + ( ds->patchWidth - i - 1 ) ] );
|
||||||
memcpy( &temp, dv1, sizeof( bspDrawVert_t ) );
|
|
||||||
memcpy( dv1, dv2, sizeof( bspDrawVert_t ) );
|
|
||||||
memcpy( dv2, &temp, sizeof( bspDrawVert_t ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user