diff options
Diffstat (limited to 'src/Person.cpp')
-rw-r--r-- | src/Person.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Person.cpp b/src/Person.cpp index ea2280c..7630000 100644 --- a/src/Person.cpp +++ b/src/Person.cpp @@ -20,6 +20,7 @@ #include <GLFW/glfw3.h> #include "Person.h" +#include "misc.h" extern float multiplier; extern unsigned int gSourceID[37]; @@ -234,9 +235,8 @@ void Person::DoAnimations(int who) auto soundsrc = (DoRotation(head_joint.position, 0, playerrotation, 0) + playercoords - camera.position) / soundscalefactor; - ALfloat gLoc[] {soundsrc.x, soundsrc.y, soundsrc.z}; - alSourcefv(gSourceID[bodyhitsound], AL_POSITION, gLoc); - alSourcePlay(gSourceID[bodyhitsound]); + playSound(gSourceID[bodyhitsound], + soundsrc.x, soundsrc.y, soundsrc.z); bleeding = 1; bleeddelay = 1; bjoint1 = &head_joint; @@ -614,9 +614,8 @@ void Person::DoAnimationslite(int who) auto soundsrc = (DoRotation(head_joint.position, 0, playerrotation, 0) + playercoords - camera.position) / soundscalefactor; - ALfloat gLoc[] {soundsrc.x, soundsrc.y, soundsrc.z}; - alSourcefv(gSourceID[bodyhitsound], AL_POSITION, gLoc); - alSourcePlay(gSourceID[bodyhitsound]); + playSound(gSourceID[bodyhitsound], + soundsrc.x, soundsrc.y, soundsrc.z); bleeding = 1; bleeddelay = 1; bjoint1 = &head_joint; @@ -629,7 +628,6 @@ void Person::DoAnimationslite(int who) targetframe = 0; else if (targetframe < 0) targetframe = animation[currentanimation].numframes - 1; - target = 0; if ((currentanimation == getupfrontanim |