I accidently reversed the limb ordering back to normal order it seems while messing with it. Try this function that reverses it again:
function setup_meshs()
tempArryCnt = array count(meshInf(0))
for i = 1 to tempArryCnt
tempObjnum = meshRefInf(meshInf(i).realMeshRefInd).objNum
if tempObjnum > 0
if meshRefInf(meshInf(i).realMeshRefInd).used = 0
meshRefInf(meshInf(i).realMeshRefInd).used = 1
meshInf(i).objNum = tempObjnum
else
meshInf(i).objNum = numObjs
clone object meshInf(i).objNum, tempObjnum, 0
inc numObjs, 1
endif
meshInf(i).limbCnt = meshRefInf(meshInf(i).realMeshRefInd).limbCnt
meshInf(i).limbCnt2 = meshRefInf(meshInf(i).realMeshRefInd).limbCnt2
position object meshInf(i).objNum, meshInf(i).PosX, meshInf(i).PosY, meshInf(i).PosZ
rotate object meshInf(i).objNum, object angle x(tempObjnum)-meshInf(i).RotX, object angle y(tempObjnum)-meshInf(i).RotY, object angle z(tempObjnum)-meshInf(i).RotZ
scale object meshInf(i).objNum, meshInf(i).ScaleX*100, meshInf(i).ScaleY*100, meshInf(i).ScaleZ*100
tempcurlimb2 = meshRefInf(meshInf(i).realMeshRefInd).limbCnt+1
tga_found = 0
for j = 0 to meshRefInf(meshInf(i).realMeshRefInd).limbCnt2
lock vertexdata for limb meshInf(i).objNum, j
tempcnt = get vertexdata vertex count()
if tempcnt > 0
for k = tempcurlimb2-1 to 0 step -1
if MeshLimbInf(i,k).vertCnt > 0
tempcurlimb2 = k
exit
endif
next k
texture limb meshInf(i).objNum, j, materialInf(MeshLimbInf(i,k).realmaterialInd).imgNum
temp_test_limb_text$ = lower$(right$(limb texture name(meshInf(i).objNum, j), 4))
if temp_test_limb_text$ = ".tga"
tga_found = 1
else
if temp_test_limb_text$ = ".png"
tga_found = 1
endif
endif
if tga_found = 0
if (16 && meshInf(i).flags)
if j = 0
convert object fvf meshInf(i).objNum, 338
set object ambient meshInf(i).objNum, 0
set object light meshInf(i).objNum, 0
endif
for k = 1 to tempcnt
set vertexdata diffuse k-1, MeshLimbVertInf(i,tempcurlimb2,k).color
next k
endif
endif
endif
sync
unlock vertexdata
next j
if tga_found = 1
set object transparency meshInf(i).objNum, 2
endif
else
meshInf(i).limbCnt = 0
meshInf(i).limbCnt2 = 0
endif
next i
endfunction
The only thing right off I can think of is it is texturing the wrong limb with the wrong texture.
As far as the time off from it ... I don't get much done on it now as I only get to work on it after work in my spare, spare time as it is. I have come up with a number of solutions for the mesh lighting errors in my head though (at least until the next version of the file format comes out):
I can do away with .x support altogether or do lightmapping on triangulated models only (the vertex counts would not be equal per limb on quad models). I can then write a .x to .smf converter (which 3dws may have with it) and load the .smf files as I would then have the quad index list from the smf format. And I could then write the .smf loader. I have the index list for the .mesh files in my loader code for it, so I can make it work. However not everyone has the .x and .smf to .mesh converter (its bundled with the leadwerks engine sdk) or the .mesh plugin that allows 3dws to load the .mesh files (comes with the engine in the developers section of his site).
Or I could do away with .mesh and .x file altogether and write a converter for them to .smf and just use that format. I'll get back with Josh if he will answer my email

and make sure he's not gonna do away with .smf support in 3dws and just move over to .mesh since it is his engine's primary format. If he'll make the converter and plugin available to everyone I would just use the .mesh format for the importer.
In any case it's late and I'm off to bed. I had to work late tonight.
[edit] Must be really sleepy ... forgot to finish my post. Thanks for testing this as I am not a level maker or modeler myself I have very limited testing levels for now. It's helping out alot, else It may have been a while before I caught that texturing bug and such as it worked with my few test levels.