Close #240
This doesn't completely eliminate the issue but it does mitigate it significantly
This commit is contained in:
parent
9d34fcf1b7
commit
44c96f1ee0
3 changed files with 6 additions and 0 deletions
|
@ -14,6 +14,8 @@ object OpBlockAxisRaycast : ConstManaOperator {
|
||||||
val origin: Vec3 = args.getChecked(0, argc)
|
val origin: Vec3 = args.getChecked(0, argc)
|
||||||
val look: Vec3 = args.getChecked(1, argc)
|
val look: Vec3 = args.getChecked(1, argc)
|
||||||
|
|
||||||
|
ctx.assertVecInRange(origin)
|
||||||
|
|
||||||
val blockHitResult = ctx.world.clip(
|
val blockHitResult = ctx.world.clip(
|
||||||
ClipContext(
|
ClipContext(
|
||||||
origin,
|
origin,
|
||||||
|
|
|
@ -14,6 +14,8 @@ object OpBlockRaycast : ConstManaOperator {
|
||||||
val origin: Vec3 = args.getChecked(0, argc)
|
val origin: Vec3 = args.getChecked(0, argc)
|
||||||
val look: Vec3 = args.getChecked(1, argc)
|
val look: Vec3 = args.getChecked(1, argc)
|
||||||
|
|
||||||
|
ctx.assertVecInRange(origin)
|
||||||
|
|
||||||
val blockHitResult = ctx.world.clip(
|
val blockHitResult = ctx.world.clip(
|
||||||
ClipContext(
|
ClipContext(
|
||||||
origin,
|
origin,
|
||||||
|
|
|
@ -15,6 +15,8 @@ object OpEntityRaycast : ConstManaOperator {
|
||||||
val look: Vec3 = args.getChecked(1, argc)
|
val look: Vec3 = args.getChecked(1, argc)
|
||||||
val endp = Operator.raycastEnd(origin, look)
|
val endp = Operator.raycastEnd(origin, look)
|
||||||
|
|
||||||
|
ctx.assertVecInRange(origin)
|
||||||
|
|
||||||
val entityHitResult = ProjectileUtil.getEntityHitResult(
|
val entityHitResult = ProjectileUtil.getEntityHitResult(
|
||||||
ctx.caster,
|
ctx.caster,
|
||||||
origin,
|
origin,
|
||||||
|
|
Loading…
Reference in a new issue