mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
Reset Position / World Time when Entity is reflected
This commit is contained in:
1 parent
f25b9fabf8
commit
2a55c36b74
1 file changed
+8
@@ -576,6 +576,14 @@ public abstract class EntityEnergyProjectile extends EntityEnergyAbility {
|
||||
barrierImpactPauseTicks = 0;
|
||||
barrierImpactDestroyOnResume = false;
|
||||
|
||||
// Reset start position and lifetime so the reflected projectile gets a fresh
|
||||
// max-distance budget and lifetime. Without this, re-reflection fails because
|
||||
// the projectile expires from the original launch's distance/time limits.
|
||||
startX = posX;
|
||||
startY = posY;
|
||||
startZ = posZ;
|
||||
deathWorldTime = -1;
|
||||
|
||||
// Detach from source ability BEFORE changing ownership.
|
||||
// This lets the ability see the projectile as gone and free the caster
|
||||
// (e.g., release movement/rotation locks on the player).
|
||||
|
||||
Reference in new issue
Block a user