mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 22:42:19 +00:00
Barrier Logic Corrections
This commit is contained in:
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());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user