Skip to content

Commit

Permalink
Sound update
Browse files Browse the repository at this point in the history
  • Loading branch information
blueSparrow2000 committed Jan 5, 2024
1 parent 2ae3841 commit a391fbb
Show file tree
Hide file tree
Showing 36 changed files with 2 additions and 28 deletions.
3 changes: 0 additions & 3 deletions public/js/eventListeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ function shootProj(event){
listen = false // block

let consumeSound = new Audio(`/consumeSound/${currentItemName}.mp3`)
consumeSound.volume = 0.1
consumeSound.play()

// decrease amount here (if needed in future)
Expand Down Expand Up @@ -183,7 +182,6 @@ function reloadGun(){
//console.log("reloading!")

let gunSound = new Audio(`/reloadSound/${currentGunName}.mp3`)
gunSound.volume = 0.1
gunSound.play()
// reload ammo here!!!!!

Expand Down Expand Up @@ -250,7 +248,6 @@ function interactItem(itemId,backEndItems){
//console.log("interacting!")

let interactSound = new Audio("/sound/interact.mp3")
interactSound.volume = 0.1
interactSound.play()

// interact here!
Expand Down
27 changes: 2 additions & 25 deletions public/js/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,25 +238,6 @@ socket.on('updateFrontEnd',({backEndPlayers, backEndEnemies, backEndProjectiles,
}
if (DISTANCE < soundhearrange) {
if (gunName){
gunSound.volume = 0.1
if (gunName==='s686'){
gunSound.volume = 0.01
}
else if (gunName==='mk14'){
gunSound.volume = 0.5
}
else if (gunName==='vector'){
gunSound.volume = 0.05
}
else if (gunName==='VSS'){
gunSound.volume = 1
}
else if (gunName==='DBS'){
gunSound.volume = 0.03
}
else if (gunName==='AWM'){
gunSound.volume = 0.5
}
gunSound.play()
}
}
Expand Down Expand Up @@ -291,12 +272,8 @@ socket.on('updateFrontEnd',({backEndPlayers, backEndEnemies, backEndProjectiles,
if (me){
const DISTANCE = Math.hypot(backendDrawable.start.x - me.x, backendDrawable.start.y - me.y)
if (DISTANCE < GUNHEARRANGE) {
const gunName = 'railgun'
if (gunName){
let gunSound = new Audio(`/sound/${gunName}.mp3`)
gunSound.volume = 0.1
gunSound.play()
}
let gunSound = new Audio('/sound/railgun.mp3')
gunSound.play()
}
}

Expand Down
Binary file modified public/reloadSound/AWM.mp3
Binary file not shown.
Binary file modified public/reloadSound/DBS.mp3
Binary file not shown.
Binary file modified public/reloadSound/FAMAS.mp3
Binary file not shown.
Binary file modified public/reloadSound/M1.mp3
Binary file not shown.
Binary file modified public/reloadSound/SLR.mp3
Binary file not shown.
Binary file modified public/reloadSound/VSS.mp3
Binary file not shown.
Binary file modified public/reloadSound/ak47.mp3
Binary file not shown.
Binary file modified public/reloadSound/mp5.mp3
Binary file not shown.
Binary file modified public/reloadSound/pistol.mp3
Binary file not shown.
Binary file modified public/reloadSound/railgun.mp3
Binary file not shown.
Binary file modified public/reloadSound/ump45.mp3
Binary file not shown.
Binary file modified public/reloadSound/usas12.mp3
Binary file not shown.
Binary file modified public/reloadSound/vector.mp3
Binary file not shown.
Binary file modified public/sound/DBS.mp3
Binary file not shown.
Binary file modified public/sound/FAMAS.mp3
Binary file not shown.
Binary file modified public/sound/M1.mp3
Binary file not shown.
Binary file modified public/sound/M249.mp3
Binary file not shown.
Binary file removed public/sound/M249_full.mp3
Binary file not shown.
Binary file removed public/sound/MK14_full.mp3
Binary file not shown.
Binary file modified public/sound/SLR.mp3
Binary file not shown.
Binary file modified public/sound/VSS.mp3
Binary file not shown.
Binary file modified public/sound/bat.mp3
Binary file not shown.
Binary file modified public/sound/fist.mp3
Binary file not shown.
Binary file modified public/sound/god.mp3
Binary file not shown.
Binary file modified public/sound/interact.mp3
Binary file not shown.
Binary file modified public/sound/knife.mp3
Binary file not shown.
Binary file modified public/sound/mp5.mp3
Binary file not shown.
Binary file modified public/sound/pistol.mp3
Binary file not shown.
Binary file modified public/sound/railgun.mp3
Binary file not shown.
Binary file removed public/sound/railgun_outofammo.mp3
Binary file not shown.
Binary file modified public/sound/s686.mp3
Binary file not shown.
Binary file modified public/sound/ump45.mp3
Binary file not shown.
Binary file modified public/sound/usas12.mp3
Binary file not shown.
Binary file modified public/sound/vector.mp3
Binary file not shown.

0 comments on commit a391fbb

Please sign in to comment.