From 9b2970a0ef71ac4ca9044383e34c63a0121d7f80 Mon Sep 17 00:00:00 2001 From: yvt Date: Sat, 21 Sep 2013 04:19:09 +0900 Subject: [PATCH] Removed unused code --- Sources/Client/ClientPlayer.cpp | 80 +-------------------------------- 1 file changed, 1 insertion(+), 79 deletions(-) diff --git a/Sources/Client/ClientPlayer.cpp b/Sources/Client/ClientPlayer.cpp index f78db704..09e3fdf2 100644 --- a/Sources/Client/ClientPlayer.cpp +++ b/Sources/Client/ClientPlayer.cpp @@ -993,85 +993,7 @@ namespace spades { ScriptIWeaponSkin interface(skin); interface.WeaponFired(); } - -#if 0 - if(!IsMuted()){ - Handle c; - std::string weapPrefix = GetWeaponPrefix("Sounds", p->GetWeapon()->GetWeaponType()); - bool isLocal = p == world->GetLocalPlayer(); - c = isLocal ? - audioDevice->RegisterSound((weapPrefix + "/FireLocal.wav").c_str()): - audioDevice->RegisterSound((weapPrefix + "/Fire.wav").c_str()); - - AudioParam param; - param.volume = 8.f; - - if(isLocal) - audioDevice->PlayLocal(c,MakeVector3(.4f, -.3f, .5f), - param); - else - audioDevice->Play(c, p->GetEye() + p->GetFront() * 0.5f - - p->GetUp() * .3f - + p->GetRight() * .4f, - param); - if(isLocal) - localFireVibrationTime = time; - - // play far sound - c = audioDevice->RegisterSound((weapPrefix + "/FireFar.wav").c_str()); - param.volume = 1.0f; - //if(p->GetWeapon()->GetWeaponType() == SMG_WEAPON) - // param.volume *= .3f; - param.referenceDistance = 10.f; - - if(isLocal) - audioDevice->PlayLocal(c,MakeVector3(.4f, -.3f, .5f), - param); - else - audioDevice->Play(c, p->GetEye() + p->GetFront() * 0.5f - - p->GetUp() * .3f - + p->GetRight() * .4f, - param); - - - c = audioDevice->RegisterSound((weapPrefix + "/FireStereo.wav").c_str()); - if(isLocal) - audioDevice->PlayLocal(c,MakeVector3(.4f, -.3f, .5f), - param); - else - audioDevice->Play(c, p->GetEye() + p->GetFront() * 0.5f - - p->GetUp() * .3f - + p->GetRight() * .4f, - param); - - if(p->GetWeapon()->GetWeaponType() == SMG_WEAPON){ - switch((rand() >> 8) & 3) { - case 0: - c = audioDevice->RegisterSound((weapPrefix + "/Mech1.wav").c_str()); - break; - case 1: - c = audioDevice->RegisterSound((weapPrefix + "/Mech2.wav").c_str()); - break; - case 2: - c = audioDevice->RegisterSound((weapPrefix + "/Mech3.wav").c_str()); - break; - case 3: - c = audioDevice->RegisterSound((weapPrefix + "/Mech4.wav").c_str()); - break; - } - param.volume = 1.6f; - if(isLocal) - audioDevice->PlayLocal(c,MakeVector3(.4f, -.3f, .5f), - param); - else - audioDevice->Play(c, p->GetEye() + p->GetFront() * 0.5f - - p->GetUp() * .3f - + p->GetRight() * .4f, - param); - } - - } -#endif + } void ClientPlayer::ReloadingWeapon() {