Skip to content

Commit

Permalink
Update events.js
Browse files Browse the repository at this point in the history
Just a simple fix so that it can play all three of each type of weapon sound. As mentioned in Issue doublespeakgames#699.
  • Loading branch information
avengah authored Sep 23, 2022
1 parent 29e1e25 commit 7ae0221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ var Events = {
var attackFn = weapon.type == 'ranged' ? Events.animateRanged : Events.animateMelee;

// play variation audio for weapon type
var r = Math.floor(Math.random() * 2) + 1;
var r = Math.floor(Math.random() * 3) + 1;
switch (weapon.type) {
case 'unarmed':
AudioEngine.playSound(AudioLibrary['WEAPON_UNARMED_' + r]);
Expand Down

0 comments on commit 7ae0221

Please sign in to comment.