Hello,
I have searched the forums and read all the documentation but I'm still having trouble figuring out the D3DVERTEX pointer in lite-c. I've attempted calling this code:
ENTITY* terrain = ent_create("maps/default.hmp",nullvector,NULL);
CONTACT* c = ent_getvertex(ent,NULL,1);
D3DVERTEX* vertexlst = ent_setvertex(ent,c,1);
...
debug_output = vertexlst[2].x;
But every time vertexlst[2].x returns a 0. vertexlst[1] always returns the right value but its the only thing in the array. I'm guessing it's because i'm just grabbing '1' of the mesh when I call ent_getvertex. Should I loop through by calling "ent_status(terrain,1)" to get the total vertices's and create my own array? E.G...
vert = ent_status(terrain,1);
for (a=0;a < vert;a++) {
CONTACT* c = ent_getvertex(ent,NULL,a);
D3DVERTEX* verttmp = ent_setvertex(ent,c,a);
vertlst[a] = verttmp[1];
}
Or am I just doing something wrong?