fix #29
This commit is contained in:
parent
e72b764534
commit
7765baf98c
1 changed files with 7 additions and 7 deletions
|
@ -81,13 +81,6 @@ data class CastingContext(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isVecInRange(vec: Vec3): Boolean {
|
fun isVecInRange(vec: Vec3): Boolean {
|
||||||
if (this.spellCircle != null) {
|
|
||||||
return this.spellCircle.aabb.contains(vec)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vec.distanceToSqr(this.caster.position()) < Operator.MAX_DISTANCE * Operator.MAX_DISTANCE)
|
|
||||||
return true
|
|
||||||
|
|
||||||
val maybeSentinel = this.caster.getCapability(HexCapabilities.SENTINEL).resolve()
|
val maybeSentinel = this.caster.getCapability(HexCapabilities.SENTINEL).resolve()
|
||||||
if (maybeSentinel.isPresent) {
|
if (maybeSentinel.isPresent) {
|
||||||
val sentinel = maybeSentinel.get()
|
val sentinel = maybeSentinel.get()
|
||||||
|
@ -98,6 +91,13 @@ data class CastingContext(
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.spellCircle != null) {
|
||||||
|
return this.spellCircle.aabb.contains(vec)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vec.distanceToSqr(this.caster.position()) < Operator.MAX_DISTANCE * Operator.MAX_DISTANCE)
|
||||||
|
return true
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue