From 7e7fe5a3349caaa9cfe92c5e20a5a97892e31e9f Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 3 May 2008 15:15:26 +0000 Subject: [PATCH] no movement sounds in water git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1840 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/physics.cpp | 2 +- source/src/sound.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/physics.cpp b/source/src/physics.cpp index 36d66cf0..ef7a7db9 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -335,7 +335,7 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) pl->jumpnext = false; pl->vel.z = 2.0f; //1.7f; // physics impulse upwards if(water) { pl->vel.x /= 8; pl->vel.y /= 8; } // dampen velocity change even harder, gives correct water feel - if(local) playsoundc(S_JUMP); + if(local && !water) playsoundc(S_JUMP); else if(pl->type==ENT_BOT) playsound(S_JUMP, pl); // Added by Rick } pl->timeinair = 0; diff --git a/source/src/sound.cpp b/source/src/sound.cpp index 1465514e..892f5bee 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -599,7 +599,7 @@ void updateplayerfootsteps(playerent *p, int sound) if(loc) // check again, only pause sound if player isn't moving { bool playing = loc->playing(); - if(!footsteps || p->state != CS_ALIVE || lastmillis-p->lastpain < 300 || (!p->onfloor && p->timeinair>50) || (!p->move && !p->strafe) || (sound==S_FOOTSTEPS && p->crouching) || (sound==S_FOOTSTEPSCROUCH && !p->crouching)) + if(!footsteps || p->state != CS_ALIVE || lastmillis-p->lastpain < 300 || (!p->onfloor && p->timeinair>50) || (!p->move && !p->strafe) || (sound==S_FOOTSTEPS && p->crouching) || (sound==S_FOOTSTEPSCROUCH && !p->crouching) || p->inwater) { if(playing) loc->pause(); }