I try inverse all normals in the mesh, but ent_getvertex /ent_setvertex do not work or i do something wrong?
Code:
 
 function invert_all_normals (ENTITY* ent)
{
	CONTACT* c;
	VECTOR inv;
	int i;
	i = ent_status (ent,1);
	for (;i>0;i--) {
		c = ent_getvertex (ent,NULL,i);
		vec_set(inv,vector(c.nx,c.ny,c.nz));vec_inverse(inv);
		c.nx = inv.x;c.ny = inv.y;c.nz = inv.z;
		//c.v.nx = inv.x;c.v.ny = inv.y;c.v.nz = inv.z;
		ent_setvertex(ent,c,i);
	}
}


Last edited by XD1v0; 05/26/09 14:22.

A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram