From 92dafc75bba246aed3f20a558a9c4eed13a1e8a9 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 26 Dec 2012 20:30:28 +0000 Subject: Corrected engine loop sound location for scaled models. --- src/client/soundext.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/client') diff --git a/src/client/soundext.cc b/src/client/soundext.cc index 0fa8d54..aeb3bd1 100644 --- a/src/client/soundext.cc +++ b/src/client/soundext.cc @@ -193,8 +193,7 @@ void SoundExt::frame(float elapsed) float pitch = 1.0f; float gain = 0.0; - // FIXME adjust for modelscale - float r = (entity()->model() ? entity()->model()->box().max().x() : entity()->radius()); + float r = (entity()->model() ? entity()->model()->box().max().x() * entity()->radius() / entity()->model()->radius() : entity()->radius()); math::Vector3f velocity; -- cgit v1.2.3