Skip to content

Commit

Permalink
fix(animations): correct animation for gunnery and grenades
Browse files Browse the repository at this point in the history
  • Loading branch information
wrycu committed Oct 9, 2023
1 parent fa76038 commit 4787ff3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ async function play_animation(animation_file, sound_file, skill, source, count)
var lower_bound = 2;
var num_shots = parseInt(count);
}
} else if (["Melee", "Brawl", "Lightsaber"].indexOf(skill) > -1) {
} else if (["Melee", "Brawl", "Lightsaber"].indexOf(skill) > -1 || skill === "grenade") {
// noinspection JSDuplicatedDeclaration
var lower_bound = 1;
var num_shots = 1;
Expand All @@ -404,7 +404,7 @@ async function play_animation(animation_file, sound_file, skill, source, count)
},
angle: -90,
};
} else if (skill.toLowerCase().includes("ranged")) {
} else if (skill.toLowerCase().includes("ranged") || skill.toLowerCase().includes("gunnery")) {
var ray = new Ray(tokens[0].center, Array.from(game.user.targets)[i].center);
var animation_config = {
position: tokens[0].center,
Expand Down

0 comments on commit 4787ff3

Please sign in to comment.