Barrier Logic Corrections

This commit is contained in:
Kam committed 2026-02-27 00:11:11 -05:00
1 parent 04e6cbe6cf
commit 1c02657282
3 files changed
+16 -10

No files matched your search

@@ -186,13 +186,17 @@ public class EntityAbilityDome extends EntityAbilityBarrier {
}
}
double prevX = projectile.posX - projectile.motionX;
double prevY = projectile.posY - projectile.motionY;
double prevZ = projectile.posZ - projectile.motionZ;
// Test the UPCOMING movement (this tick) so the barrier intercepts before
// entity collision runs in updateProjectile(). Using the previous tick's
// segment caused small domes to miss fast projectiles that could cross the
// dome and hit the player in a single tick.
double nextX = projectile.posX + projectile.motionX;
double nextY = projectile.posY + projectile.motionY;
double nextZ = projectile.posZ + projectile.motionZ;
return isIncomingRay(
nextX, nextY, nextZ,
projectile.posX, projectile.posY, projectile.posZ,
prevX, prevY, prevZ,
projectile.getOwnerEntityId());
}