@slin:

Thanks for showing me those nice shortcuts. I'll merge those changes into my movement code and hopefully re-post it soon. Actually, I take it back. After thinking it over, I'll probably keep these lines the same:

accelerate(move_to_vector.y, (key_d * strafe_speed * time_step * -1), 0.8);
accelerate(move_to_vector.y, (key_a * strafe_speed * time_step), 0.8);
accelerate(move_to_vector.x, (key_w * run_speed * time_step), 0.8);
accelerate(move_to_vector.x, (key_s * run_speed * time_step * -1), 0.8);

You are absolutely correct that they can be merged into 2 lines, but for me it's more readable as 4 lines. In this case, I'll choose readability over saving the CPU cycles.

To answer your question:

Quote:


Why do you use c_setminmax and then reset the boundingbox to an own size (vec_set(my.min_x,vector(-7,-7,-20));vec_set(my.max_x,vector(7,7,20));)?





I noticed that if I tried to set the bounding box without first calling c_setminmax(), my bounding box settings were ignored! Maybe I was hallucinating - but that's why the c_setminmax is in there. Weird.

Last edited by clone45; 01/11/08 07:46.