[Tuxracer-checkins] CVS: tuxracer/src phys_sim.c,1.25,1.26
Status: Beta
Brought to you by:
jfpatry
From: Jasmin P. <jf...@us...> - 2000-09-19 00:00:59
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv19121 Modified Files: phys_sim.c Log Message: Cleaned up particle generation code. Index: phys_sim.c =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/phys_sim.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** phys_sim.c 2000/09/16 17:04:57 1.25 --- phys_sim.c 2000/09/19 00:00:50 1.26 *************** *** 1047,1051 **** point_t pos, scalar_t speed ) { ! point_t left_part_pt, right_part_pt, center_part_pt; scalar_t brake_particles; scalar_t turn_particles; --- 1047,1051 ---- point_t pos, scalar_t speed ) { ! point_t left_part_pt, right_part_pt; scalar_t brake_particles; scalar_t turn_particles; *************** *** 1053,1058 **** scalar_t surf_weights[NumTerrains]; scalar_t surf_y; ! scalar_t left_particles, right_particles, center_particles; ! vector_t left_part_vel, right_part_vel, center_part_vel; matrixgl_t rot_mat; vector_t xvec; --- 1053,1058 ---- scalar_t surf_weights[NumTerrains]; scalar_t surf_y; ! scalar_t left_particles, right_particles; ! vector_t left_part_vel, right_part_vel; matrixgl_t rot_mat; vector_t xvec; *************** *** 1064,1068 **** xvec = cross_product( plyr->direction, plyr->plane_nml ); ! right_part_pt = left_part_pt = center_part_pt = pos; right_part_pt = move_point( --- 1064,1068 ---- xvec = cross_product( plyr->direction, plyr->plane_nml ); ! right_part_pt = left_part_pt = pos; right_part_pt = move_point( *************** *** 1074,1078 **** scale_vector( -TUX_WIDTH/2.0, xvec ) ); ! right_part_pt.y = left_part_pt.y = center_part_pt.y = surf_y; brake_particles = dtime * --- 1074,1078 ---- scale_vector( -TUX_WIDTH/2.0, xvec ) ); ! right_part_pt.y = left_part_pt.y = surf_y; brake_particles = dtime * *************** *** 1094,1102 **** roll_particles * fabs( max(plyr->control.turn_animation, 0.) ); - center_particles = 0; /* XXX - clean up */ - left_particles = adjust_particle_count( left_particles ); right_particles = adjust_particle_count( right_particles ); - center_particles = adjust_particle_count( center_particles ); /* Create particle velocitites */ --- 1094,1099 ---- *************** *** 1119,1135 **** right_part_vel ); - make_rotation_about_vector_matrix( - rot_mat, xvec, - max( 0, - MAX_PARTICLE_ANGLE * - ( 1.0 - speed / MAX_PARTICLE_ANGLE_SPEED ) ) ); - center_part_vel = transform_vector( rot_mat, plyr->plane_nml ); - create_new_particles( left_part_pt, left_part_vel, (int)left_particles ); create_new_particles( right_part_pt, right_part_vel, (int)right_particles ); - create_new_particles( center_part_pt, center_part_vel, - (int)center_particles ); } } --- 1116,1123 ---- |