Index: tools/compilers/dmap/dmap.cpp
===================================================================
--- tools/compilers/dmap/dmap.cpp	(revision 10635)
+++ tools/compilers/dmap/dmap.cpp	(working copy)
@@ -320,6 +320,8 @@
 		extern idCVar dmap_tjunctionsAlgorithm;
 		dmap_aasExpandBrushUseEdgesOnce.SetBool(version >= 211);
 		dmap_tjunctionsAlgorithm.SetBool(version >= 211);
+		//new in 2.13
+		dmap_outputNoSnap.SetBool(version >= 213);
 	}
 
 	if ( args.Argc() < 2 ) {
Index: tools/compilers/dmap/dmap.h
===================================================================
--- tools/compilers/dmap/dmap.h	(revision 10635)
+++ tools/compilers/dmap/dmap.h	(working copy)
@@ -34,6 +34,8 @@
 extern idCVar dmap_pruneAasBrushesChopping;
 extern idCVar dmap_fasterAasWaterJumpReachability;
 extern idCVar dmap_disableCellSnappingTjunc;
+//TDM 2.13:
+extern idCVar dmap_outputNoSnap;
 
 
 typedef struct primitive_s {
Index: tools/compilers/dmap/facebsp.cpp
===================================================================
--- tools/compilers/dmap/facebsp.cpp	(revision 10635)
+++ tools/compilers/dmap/facebsp.cpp	(working copy)
@@ -341,6 +341,9 @@
 
 	// split the bounds if we have a nice axial plane
 	for ( i = 0 ; i < 3 ; i++ ) {
+		// stgatilov: these bounds are only used in this function
+		// they are overwritten in CalcNodeBounds later
+		// so it is OK that they are not precise
 		if ( idMath::Fabs( plane[i] - 1.0 ) < 0.001 ) {
 			node->children[0]->bounds[0][i] = plane.Dist();
 			node->children[1]->bounds[1][i] = plane.Dist();
Index: tools/compilers/dmap/output.cpp
===================================================================
--- tools/compilers/dmap/output.cpp	(revision 10635)
+++ tools/compilers/dmap/output.cpp	(working copy)
@@ -26,6 +26,7 @@
 #if 0
 
 should we try and snap values very close to 0.5, 0.25, 0.125, etc?
+stgatilov #6480: please no!
 
   do we write out normals, or just a "smooth shade" flag?
 resolved: normals.  otherwise adjacent facet shaded surfaces get their
@@ -77,9 +78,15 @@
 	return a1;
 }
 
+idCVar dmap_outputNoSnap(
+	"dmap_outputNoSnap", "1", CVAR_BOOL | CVAR_SYSTEM,
+	"Disables weird snapping of all floats to integers in output. "
+	"This is stability fix for TDM 2.13 (#6480)."
+);
+
 static void WriteFloat( idFile *f, float v )
 {
-	if ( idMath::Fabs(v - idMath::Round(v)) < 0.001 ) {
+	if ( dmap_outputNoSnap.GetBool() ? v == idMath::Round(v) : idMath::Fabs(v - idMath::Round(v)) < 0.001 ) {
 		f->WriteFloatString( "%i ", (int)idMath::Round(v) );
 	}
 	else {
@@ -353,7 +360,9 @@
 	// verts
 	col = 0;
 	for ( i = 0 ; i < tri->numVerts ; i++ ) {
-		Write1DMatrix( procFile, 3, &tri->shadowVertexes[i].xyz[0] );
+		idVec4 pos = tri->shadowVertexes[i].xyz;
+		assert( pos.w == 1.0f );
+		Write1DMatrix( procFile, 3, &pos[0] );
 
 		if ( ++col == 5 ) {
 			col = 0;
