From 8a0b7c57ef8e772ea3f565c39c42d0be9e507221 Mon Sep 17 00:00:00 2001 From: driAn Date: Mon, 21 Apr 2008 17:51:24 +0000 Subject: [PATCH] roloff factor 2 git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1817 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/sound.cpp | 7 ++----- source/src/weapon.cpp | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/source/src/sound.cpp b/source/src/sound.cpp index f26c3862..9b3edec1 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -284,6 +284,7 @@ struct location { alGenSources(1, &id); alSourcef(id, AL_MAX_GAIN, maxgain); + alSourcef(id, AL_ROLLOFF_FACTOR, 2.0f); return !alerr(); } @@ -476,7 +477,6 @@ void initsound() { conoutf("Sound: %s (%s)", alGetString(AL_RENDERER), alGetString(AL_VENDOR)); conoutf("Driver: %s", alGetString(AL_VERSION)); - //alDistanceModel(AL_INVERSE_DISTANCE); alDistanceModel(AL_EXPONENT_DISTANCE_CLAMPED); nosound = false; } @@ -658,10 +658,7 @@ void updatevol() execute(cmd); delete[] cmd; } - else - { - gamemusic.replay(); - } + else gamemusic.replay(); } } diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index c8536339..6bf2d468 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -676,12 +676,12 @@ void grenades::thrownade() { const float speed = cosf(RAD*owner->pitch); vec vel(sinf(RAD*owner->yaw)*speed, -cosf(RAD*owner->yaw)*speed, sinf(RAD*owner->pitch)); - vel.mul(1.6f); + vel.mul(1.5f); vec from(vel); from.normalize(); from.mul(owner->radius+inhandnade->radius); - from.mul(1.8f); + from.mul(1.85f); from.add(owner->o); thrownade(from, vel, inhandnade);