diff --git a/static/filterWeapons.js b/static/filterWeapons.js index 76d9647..b523f7a 100644 --- a/static/filterWeapons.js +++ b/static/filterWeapons.js @@ -10,7 +10,7 @@ let isEditing = false; //fetch operatives data from JSON function fetchOperativesData() { - fetch('/trlstats/static/json/operative.json') + fetch('static/json/operative.json') .then(response => response.json()) .then(data => { populateOperatives(data.operatives); @@ -283,15 +283,10 @@ function applyModifiers() { return; } if (mod.dataset.type === 'multiplicative-headshot') { - if (!headshotBaseApplied) { - const baseHeadshotModifier = document.querySelector("#modifiers input[data-type='multiplicative-headshot-base']"); - if (baseHeadshotModifier && !baseHeadshotModifier.checked) { - baseHeadshotModifier.checked = true; - headshotMultiplier += parseFloat(baseHeadshotModifier.value) - 1; - headshotBaseApplied = true; - } + // Only apply headshot multipliers if the base headshot modifier is active + if (headshotBaseApplied) { + headshotMultiplier += parseFloat(mod.value) - 1; } - headshotMultiplier += parseFloat(mod.value) - 1; } else if (mod.dataset.type === 'multiplicative-headshot-base') { if (!headshotBaseApplied) { headshotMultiplier += parseFloat(mod.value) - 1; @@ -396,7 +391,10 @@ function applyBuff(buff, rpmModifier, reloadTimeModifier, damageModifier) { return; } if (buffType === 'multiplicative-headshot') { - headshotMultiplier += value - 1; + // Only apply if base headshot modifier is active + if (headshotBaseApplied) { + headshotMultiplier += value - 1; + } return; } if (type === 'rpm') { diff --git a/static/json/data.json b/static/json/data.json index 7ac6ca6..23f644d 100644 --- a/static/json/data.json +++ b/static/json/data.json @@ -107,7 +107,7 @@ "rpm": 60, "mag_size": 8, "reload_time": 2.8, - "guntype": ["RIFLE", "SEMI-AUTO", "PRIMARY"] + "guntype": ["RIFLE", "SEMI-AUTO", "PRIMARY", "WW2"] }, { "id": 12, diff --git a/templates/about_us.html b/templates/about_us.html index 9985ca9..d715e49 100644 --- a/templates/about_us.html +++ b/templates/about_us.html @@ -85,7 +85,7 @@