Removed unused code
This commit is contained in:
parent
9da577a491
commit
9b2970a0ef
@ -993,85 +993,7 @@ namespace spades {
|
||||
ScriptIWeaponSkin interface(skin);
|
||||
interface.WeaponFired();
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(!IsMuted()){
|
||||
Handle<IAudioChunk> 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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user