I try to translate some old code in lite-c, and i do not know how to define rot_angle and rot_speed in this function. What i must use vector pointer, vector, var, entity,...? What is wrong here?

Code:
function rotate_model(rot_angle,rot_speed) {
	if (my.pan == rot_angle) { return; }
	temp.x = ang(rot_angle - my.pan);
	if (temp.x > 0) { result = 1; }
	if (temp.x < 0) { result = -1; }
	my.pan_force = rot_speed * ang(rot_angle - my.pan);
	my.pan_velocity += (time_step * my.pan_force) - (minv(time_step*0.7,1) * my.pan_velocity);
	temp.x = ang(rot_angle.pan - (my.pan + my.pan_velocity));
	if (temp.x > 0 && result == -1) || (temp.x < 0 && result == 1) { my.pan_velocity = ang(rot_angle.pan - my.pan); }
	c_rotate(my,vector(my.pan_velocity * time_step,0,0),IGNORE_PASSABLE|IGNORE_YOU|IGNORE_MODELS|USE_BOX);
}



Last edited by CodeMaster; 01/18/11 00:19.