From fd1f8fa0d9572cdbe10a6ed1174df79c1b4bad4e Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 3 May 2008 21:57:40 +0000 Subject: [PATCH] footstep fixes git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1852 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/sound.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/src/sound.cpp b/source/src/sound.cpp index 892f5bee..c90b30da 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -552,6 +552,7 @@ void soundcleanup() void clearsounds() { mapsounds.setsizenodelete(0); + loopv(locations) locations[i].reset(); locations.setsizenodelete(0); } @@ -729,8 +730,9 @@ void playsound(int n, physent *p, entity *ent, const vec *v, int priority) } } } - if(farthestscore >= score+5.0f) // better don't play a new one than stopping a playing sound + if(farthestscore >= score+5.0f) { + loc = farthest; conoutf("ac sound sched: replaced sound of same prio"); // FIXME } } @@ -742,6 +744,7 @@ void playsound(int n, physent *p, entity *ent, const vec *v, int priority) } + loc->reset(); loc->priority = priority; // attach to world obj if(p) loc->attachtoworldobj(p);