From 497deaf4774f6f2c478c52ff092a6eb85f2e0939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Mon, 9 Aug 2021 21:54:05 +0700 Subject: Disable NPC's footsteps and clean up sound loading https://todo.sr.ht/~cnx/blackshades/13 --- src/Person.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Person.cpp') diff --git a/src/Person.cpp b/src/Person.cpp index c8340d8..7e0d41c 100644 --- a/src/Person.cpp +++ b/src/Person.cpp @@ -217,7 +217,7 @@ void Person::DoAnimations(int who) if (!slomo && !visions && (onground || abs(velocity.y) < 1) && (targetanimation == joganim || targetanimation == walkanim) - && (targetframe == 0 || targetframe == 8)) { + && (targetframe == 0 || targetframe == 8) && who == 0) { auto soundsrc = (playercoords - camera.position) / soundscalefactor; ALfloat gLoc[] {soundsrc.x, soundsrc.y, soundsrc.z}; @@ -595,7 +595,7 @@ void Person::DoAnimationslite(int who) return; if (target > 1) { // Footstep sounds - if (!visions && (onground || abs(velocity.y) < 1) + if (who == 0 && !visions && (onground || abs(velocity.y) < 1) && (targetanimation == joganim || targetanimation == walkanim) && (targetframe == 0 || targetframe == 8)) { -- cgit v1.2.3