hey vet, i started to play with your wrapper again, and just to let you know:

the ent_setmatrix_rb function needs to be changed to work with 7.77, or entites have a wrong tilt value(random?)

this is the updated version:
Code:
void ent_setmatrix_rb(ENTITY *entity, float *m)
{
	float pan, tilt, roll;
	
	if(fabs(m[2]) > 0.9999) // looking straight up or down -> gimbal lock
	{
		pan = atan2(-m[4], m[5]); // -m[4]?
		tilt = 1.570796 * sign(m[2]);
		roll = 0;
	}
	else
	{
		pan = atan2(m[1], m[0]); // swap?
		tilt = atan2(m[2],sqrt(m[1]*m[1] + m[0]*m[0]));
		roll = atan2(m[6], m[10]);
	}
	
	entity->pan = pan * RAD2DEG;
	entity->tilt = tilt * RAD2DEG;
	entity->roll = roll * RAD2DEG;
	
	entity->x = m[12] * METERTOQUANT;
	entity->y = m[13] * METERTOQUANT;
	entity->z = m[14] * METERTOQUANT;
}


just to let you know.


3333333333