diff options
Diffstat (limited to 'src/Person.cpp')
| -rw-r--r-- | src/Person.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Person.cpp b/src/Person.cpp index 65eb002..0b0a97c 100644 --- a/src/Person.cpp +++ b/src/Person.cpp @@ -105,9 +105,9 @@ HitStruct Person::BulletCollideWithPlayer(int who, XYZ start, XYZ end){ tempbulletloc[1].y=M[13]; tempbulletloc[1].z=M[14]; glPopMatrix(); - collide=skeletonmodels[joint.modelnum].LineCheck(tempbulletloc[0],tempbulletloc[1],&collisionpoint); - if(collide!=-1) - { + collide = segCrossModel(tempbulletloc[0], tempbulletloc[1], + skeletonmodels + joint.modelnum, &collisionpoint); + if (collide > -1) { glPushMatrix(); glLoadIdentity(); glTranslatef((joint.position.x + joint.parent->position.x) / 2, @@ -165,9 +165,10 @@ HitStruct Person::BulletCollideWithPlayer(int who, XYZ start, XYZ end){ tempbulletloc[1].y=M[13]; tempbulletloc[1].z=M[14]; glPopMatrix(); - collide=skeletonmodels[skeleton.muscles[j].parent1->modelnum].LineCheck(tempbulletloc[0],tempbulletloc[1],&collisionpoint); - if(collide!=-1) - { + collide = segCrossModel(tempbulletloc[0], tempbulletloc[1], + skeletonmodels + skeleton.muscles[j].parent1->modelnum, + &collisionpoint); + if (collide > -1) { glPushMatrix(); glLoadIdentity(); glTranslatef( (skeleton.muscles[j].parent1->position.x+skeleton.muscles[j].parent2->position.x)/2, |
