X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSkeleton.cpp;h=af343d6b3261b3a405f876f877e665a7a6813c85;hb=47bd467205c41f5c993fb9d3f2b31338989c641c;hp=c7c9eb00912c0e15c78bcf6aaeb798b49c7b764b;hpb=67bbb7c3b4b1bd06c150ddb31d2a264e8dd99281;p=lugaru.git diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index c7c9eb0..af343d6 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -26,17 +26,12 @@ along with Lugaru. If not, see . extern float multiplier; extern float gravity; -extern Skeleton testskeleton; extern Terrain terrain; extern Objects objects; extern int environment; extern float camerashake; extern bool freeze; extern int detail; -extern XYZ envsound[30]; -extern float envsoundvol[30]; -extern int numenvsounds; -extern float envsoundlife[30]; extern int tutoriallevel; extern int whichjointstartarray[26]; @@ -351,10 +346,7 @@ float Skeleton::DoConstraints(XYZ *coords, float *scale) emit_sound_at(breaksound2, joints[i].position * (*scale) + *coords); - envsound[numenvsounds] = *coords; - envsoundvol[numenvsounds] = 64; - envsoundlife[numenvsounds] = .4; - numenvsounds++; + addEnvSound(*coords, 64); } if (findLengthfast(&bounceness) > 2500) { @@ -439,10 +431,7 @@ float Skeleton::DoConstraints(XYZ *coords, float *scale) emit_sound_at(breaksound2, joints[i].position * (*scale) + *coords); - envsound[numenvsounds] = *coords; - envsoundvol[numenvsounds] = 64; - envsoundlife[numenvsounds] = .4; - numenvsounds++; + addEnvSound(*coords, 64); } if (objects.type[k] == treetrunktype) { objects.rotx[k] += joints[i].velocity.x * multiplier * .4;