aboutsummaryrefslogtreecommitdiff
path: root/src/Person.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-09-24 15:59:13 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-09-24 15:59:13 +0700
commit3f12f26560fc04a5a9ccc2964e900f79a61e510c (patch)
tree3ae078546287ccad3f03499b5043f49c59c7b962 /src/Person.cpp
parent0ce03e65978dd1e0d4fdf590fc4eadd639d1a57d (diff)
downloadblackshades-3f12f26560fc04a5a9ccc2964e900f79a61e510c.tar.gz
Replace a few sound effects
Diffstat (limited to 'src/Person.cpp')
-rw-r--r--src/Person.cpp12
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