From 3ef184e1d845b8f85dd51d3d63dbf842cbdd0354 Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 6 Dec 2008 13:32:38 +0000 Subject: [PATCH] fixed footstep sound radius bug git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3883 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/audiomanager.cpp | 6 ++++-- source/src/sound.h | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/source/src/audiomanager.cpp b/source/src/audiomanager.cpp index 2129cf71..b6f4948c 100644 --- a/source/src/audiomanager.cpp +++ b/source/src/audiomanager.cpp @@ -259,7 +259,7 @@ void audiomanager::updateplayerfootsteps(playerent *p) { if(!p) return; - const int footstepradius = 10; + const int footstepradius = 20; static float lastoffset = 0; // find existing footstep sounds @@ -406,6 +406,7 @@ soundconfig::soundconfig(sbuffer *b, int vol, int maxuses, bool loop, int audibl this->maxuses = maxuses; this->loop = loop; this->audibleradius = audibleradius; + this->model = audibleradius > 0 ? DM_LINEAR : DM_DEFAULT; // use linear model when radius is configured uses = 0; muted = false; } @@ -553,7 +554,8 @@ void audiomanager::updateaudio() if(e.type!=SOUND) continue; int sound = e.attr1; - bool hearable = e.attr2==0 || camera1->o.dist(o)o.dist(o)