Index: binaries/data/mods/public/simulation/components/Damage.js =================================================================== --- binaries/data/mods/public/simulation/components/Damage.js +++ binaries/data/mods/public/simulation/components/Damage.js @@ -167,6 +167,8 @@ // Get nearby entities and define variables let nearEnts = this.EntitiesNearPoint(data.origin, data.radius, data.playersToDamage); let damageMultiplier = 1; + let dir = Vector2D.from3D(data.direction); + // Cycle through all the nearby entities and damage it appropriately based on its distance from the origin. for (let ent of nearEnts) { @@ -181,9 +183,9 @@ // The width of linear splash is one fifth of the normal splash radius. let width = data.radius / 5; - // Effectivly rotate the axis to align with the missile direction. - let parallelDist = relativePos.dot(data.direction); // z axis - let perpDist = Math.abs(relativePos.cross(data.direction)); // y axis + // Distances parallel and perpendicular to the missile direction. + let parallelDist = relativePos.dot(dir); + let perpDist = Math.abs(relativePos.cross(dir)); // Check that the unit is within the distance at which it will get damaged. if (parallelDist > -width && perpDist < width) // If in radius, quadratic falloff in both directions