[Gtkradiant] [Bug 637] 45 degree brush and texture angle bug with radiant and q3map

gtkradiant@zerowing.idsoftware.com gtkradiant@zerowing.idsoftware.com
Thu, 24 Oct 2002 11:30:51 -0500


http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=637





------- Additional Comments From jmonroe@ravensoft.com  2002-10-24 11:30 -------
We ran into this bug during elite force.  Our "fix" was to add a little fudge 
to the best compare routine in both Radiant and q3map:

void TextureAxisFromPlane(plane_t *pln, vec3_t xv, vec3_t yv)
{
	int		bestaxis;
	float	dot,best;
	int		i;
	
	best = 0;
	bestaxis = 0;
	
	for (i=0 ; i<6 ; i++)
	{
		dot = DotProduct (pln->normal, baseaxis[i*3]);
		if (dot > (best + 0.0001))
		{
			best = dot;
			bestaxis = i;
		}
	}
	
	VectorCopy (baseaxis[bestaxis*3+1], xv);
	VectorCopy (baseaxis[bestaxis*3+2], yv);
}


I apologize for not providing a patch, but I haven't quite figured that out 
yet.  :)