Hmm.... tricky one.
I figured out that some of the HitTriangles on that table have zero normal, which is bad news. The revision which triggered this is r949, the reason is that Normalize() doesn't check for zero length before dividing, like the old code used to.
But the real issue is that we shouldn't have any hit triangles with zero normal. Turns out they come from ramps, here to be precise:
Vertex3Ds rgv3D[3];
rgv3D[0] = Vertex3Ds(pv3->x,pv3->y,rgheight1[i+1]);
rgv3D[1] = Vertex3Ds(pv1->x,pv1->y,rgheight1[i]);
rgv3D[2] = Vertex3Ds(pv4->x,pv4->y,rgheight1[i+1]);
HitTriangle * const ph3dpoly = new HitTriangle(rgv3D);
And here is a list of ramps which trigger this bug:
Ramp1002
Ramp1003
Ramp709
Ramp1023
Ramp1021
Ramp601
Ramp1026
Ramp1027
Ramp294
Ramp303
Ramp966
It seemed that cvertex was 2 on all of those that I checked. Not sure yet what the root cause is here, have to find one of those in the editor first. I really wish the dropdown menu for finding elements by name wouldn't extend past the border of the screen...
EDIT: Aha! Those seem to be the ramps which have Top Width or Bottom Width 0. Why do they exist?
Edited by mukuste, 24 March 2014 - 01:17 AM.