From 028f1ae2a0e7b87e22e56bf2b219a97ea6ede0ea Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sat, 26 Mar 2022 21:49:31 -0700 Subject: [PATCH] patchDef2WS now is always treated as fixed, as it should be --- tools/vmap/map.c | 9 ++++++--- tools/vmap/patch.c | 4 ++-- tools/vmap/vmap.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/vmap/map.c b/tools/vmap/map.c index 8b04437..b5cbdcd 100644 --- a/tools/vmap/map.c +++ b/tools/vmap/map.c @@ -1716,12 +1716,15 @@ static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups ) } /* check */ - if ( !strcmp( token, "patchDef2" ) || !strcmp( token, "patchDef2WS" ) ) { + if ( !strcmp( token, "patchDef2" ) ) { numMapPatches++; - ParsePatch( onlyLights, qfalse ); + ParsePatch( onlyLights, qfalse, qfalse ); + } else if ( !strcmp( token, "patchDef2WS" ) ) { + numMapPatches++; + ParsePatch( onlyLights, qtrue, qfalse ); } else if ( !strcmp( token, "patchDef3" ) || !strcmp( token, "patchDef3WS" ) ) { numMapPatches++; - ParsePatch( onlyLights, qtrue ); + ParsePatch( onlyLights, qtrue, qtrue ); // } else if ( !strcmp( token, "patchDefWS" ) ) { // numMapPatches++; // ParsePatch( onlyLights, qfalse ); diff --git a/tools/vmap/patch.c b/tools/vmap/patch.c index a394674..5f7b6e8 100644 --- a/tools/vmap/patch.c +++ b/tools/vmap/patch.c @@ -252,7 +252,7 @@ void ParseVertMatrix(bspDrawVert_t *v) creates a mapDrawSurface_t from the patch text */ -void ParsePatch( qboolean onlyLights, qboolean fixedtess ){ +void ParsePatch( qboolean onlyLights, qboolean fixedtess, qboolean extended ){ vec_t info[ 5 ]; int i, j; parseMesh_t *pm; @@ -272,7 +272,7 @@ void ParsePatch( qboolean onlyLights, qboolean fixedtess ){ GetToken( qtrue ); strcpy( texture, token ); - if (fixedtess) + if (extended) Parse1DMatrix( 7, info ); else Parse1DMatrix( 5, info ); diff --git a/tools/vmap/vmap.h b/tools/vmap/vmap.h index 780878a..4ba65dd 100644 --- a/tools/vmap/vmap.h +++ b/tools/vmap/vmap.h @@ -1655,7 +1655,7 @@ void FreeTreePortals_r( node_t *node ); /* patch.c */ -void ParsePatch( qboolean onlyLights, qboolean fixedsubdivs ); +void ParsePatch( qboolean onlyLights, qboolean fixedsubdivs, qboolean extended ); void ParsePatchWS( qboolean onlyLights ); mesh_t *SubdivideMesh( mesh_t in, float maxError, float minLength ); void PatchMapDrawSurfs( entity_t *e );