mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 20:44:08 +00:00
Better Animation Snapping
This commit is contained in:
1 parent
f538cebd03
commit
6369cb2b65
2 files changed
+25
-27
No files matched your search
@@ -298,7 +298,6 @@ public class PlayerAbilityData extends AbstractDataAbilities implements IPlayerA
|
||||
// Apply rotation and position locks after ability tick
|
||||
applyRotationControl(player);
|
||||
applyPositionLock(player);
|
||||
applyAnimationRotationSync(player);
|
||||
|
||||
// Sync lock state to client (only sends when flags change)
|
||||
syncAbilityStateIfNeeded(player);
|
||||
@@ -846,17 +845,6 @@ public class PlayerAbilityData extends AbstractDataAbilities implements IPlayerA
|
||||
}
|
||||
}
|
||||
|
||||
private void applyAnimationRotationSync(EntityPlayer player) {
|
||||
if (rotationLocked || currentAbility == null) return;
|
||||
if (currentAbility.getPhase() == AbilityPhase.IDLE || currentAbility.getPhase() == AbilityPhase.DAZED)
|
||||
return;
|
||||
|
||||
// TODO This is a temporary duct-tape solution to fix the animation not rotating with head rotation
|
||||
if (!currentAbility.isRotationLockedForCurrentPhase() && player instanceof EntityPlayerMP) {
|
||||
NoppesUtilPlayer.swingPlayerArm((EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// POSITION LOCKING (Player-specific application)
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in new issue
Block a user