X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=rigidbody.h;h=480e43fb5d086752fb42d9ec559681d6f1d97442;hb=2a6a779a1ad3f1a781e2437732bc62055096439e;hp=04d5a9c9830c824d466b7c3fb7cff82364556726;hpb=d58ce0e646e7cf3df81cb308f4cac36a1e9bda97;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/rigidbody.h b/rigidbody.h index 04d5a9c..480e43f 100644 --- a/rigidbody.h +++ b/rigidbody.h @@ -1427,12 +1427,13 @@ next_vert:; vg_line( tri[1],tri[2],0x10ffffff ); vg_line( tri[2],tri[0],0x10ffffff ); - int hits = rb_sphere_triangle( rba, rbb, tri, buf+count ); + int contact = rb_sphere_triangle( rba, rbb, tri, buf+count ); + #ifdef RIGIDBODY_DYNAMIC_MESH_EDGES - if( hits ) + if( contact ) inf->collided = 1; #endif - count += hits; + count += contact; if( count == 12 ) { @@ -1475,7 +1476,7 @@ next_vert:; continue; rb_ct *ct = buf+count; - + v3_muls( inf_i->normal, c0, ct->n ); v3_muladds( ct->n, inf_j->normal, c1, ct->n ); v3_normalize( ct->n );