Hex Casting

Hex Casting

6M Downloads

[Bug] Csasting range measured from feet

Talia-12 opened this issue ยท 0 comments

commented

In CastingContext.isVecInRange the comment "we use the eye position cause thats where the caster gets their "position" from" is present before the check for whether the vec is in range of a cleric circle - this check is done relative to the player's eyes.

if (this.spellCircle.activatorAlwaysInRange && vec.distanceToSqr(this.caster.eyePosition) < range * range)

However lower down where the distance check is actually done for when the player is casting, the check is instead done against the player's feet

if (vec.distanceToSqr(this.caster.position()) < Operator.MAX_DISTANCE * Operator.MAX_DISTANCE)

(also it's mildly annoying to me that the file ends with

        if (vec.distanceToSqr(this.caster.position()) < Operator.MAX_DISTANCE * Operator.MAX_DISTANCE)
            return true

        return false

instead of

return vec.distanceToSqr(this.caster.position()) < Operator.MAX_DISTANCE * Operator.MAX_DISTANCE

)