Phase 0 audit findings : fixes D-07 + D-08 post-verification

Cross-check de l'audit Phase 0 contre les sources EF (4 agents) a remonté :

D-08 RÉFUTÉ partiellement :
  - EF LivingEntityPatch.getTarget() = getLastHurtMob() — identique à notre stub.
  - MAIS MobPatch.getTarget() override avec Mob.getTarget() manquait chez nous.
  - Fix : override ajouté, ref commentée à EF MobPatch.java:171-174.
  - Sans ça, MoveCoordFunctions.MOB_ATTACK_TARGET_LOOK aurait la mauvaise
    sémantique (dernier mob qui m'a frappé vs cible AI courante) → NPC ne
    tourne pas vers sa cible pendant attack anim.

D-07 VALIDÉ :
  - correctRootJoint zero-out X/Z de la Root en espace monde pour éviter
    sliding visuel pendant LinkAnimation vers ActionAnimation.
  - Safe Phase 1 (idle/walk = StaticAnimation, pas ActionAnimation).
  - Critical Phase 2+ dès qu'une vraie ActionAnimation bondage est jouée.
  - Fix : dev assertion LOGGER.warn en IS_DEV_ENV pointant vers
    PHASE0_DEGRADATIONS.md D-07. Empêche découverte tardive.

Autres findings post-vérification (traçés en doc gitignorée) :
  D-01 getAnimator()=null : fix Phase 2 (pas Phase 1) — field protected EF-style
  D-02 sync() stripped : FAUX-POSITIF partiel — BEGINNING_LOCATION non affecté
       (IndependentVariableKey non-synced), seul DESTINATION en MP dédié
  D-03 InstantiateInvoker throws : swallowed par try/catch, silent no-op
  D-04 Patch suppression : doc EXTRACTION.md §3.12/§10 corrigée (Option A)
  D-05 reloadAllSkillsAnimations : était déjà dans SkillManager (commentaire OK)
  D-06 playAnimationAt : ARCHITECTURE.md §5.5.1 pseudocode (signature fantôme)
       → notes ajoutées pointant vers D-06
  D-09 AnimationBegin/EndEvent : listeners EF uniquement skill system interne,
       ON_BEGIN/END_EVENTS data-driven continuent de fonctionner
  D-10 AT 127 lignes : ~50% utile (GUI TiedUp existant), ne pas fix maintenant

IK stack (S-05 pas dans les docs) : section R12 ajoutée à ARCHITECTURE.md §11.

Compile BUILD SUCCESSFUL maintenu (0 errors).
This commit is contained in:
notevil
2026-04-22 03:39:44 +02:00
parent 1cef57a472
commit 4a615368df
2 changed files with 31 additions and 3 deletions

View File

@@ -47,8 +47,15 @@ public class ActionAnimation extends MainFrameAnimation {
}
/**
* Stub — LinkAnimation.modifyPose appelle ça pour aligner la root joint
* en espace monde pendant la transition. No-op en TiedUp.
* Stub Phase 0 — LinkAnimation.modifyPose appelle ça pour zero-out X/Z de la
* Root joint en espace monde (empêche le sliding visuel pendant la transition
* vers une ActionAnimation sans keyframe "Coord"). Voir EF
* {@code yesman.epicfight.api.animation.types.ActionAnimation:209-222}.
*
* <p>Safe Phase 1 (idle/walk sont des StaticAnimation, pas ActionAnimation →
* jamais appelée). À re-implémenter Phase 2 dès qu'on introduit de vraies
* ActionAnimations bondage — sinon : sliding visible pendant transitionTime
* frames à chaque entrée dans l'action anim.</p>
*/
public void correctRootJoint(
com.tiedup.remake.rig.anim.types.LinkAnimation linkAnimation,
@@ -57,6 +64,11 @@ public class ActionAnimation extends MainFrameAnimation {
float time,
float partialTicks
) {
// no-op
if (com.tiedup.remake.rig.TiedUpRigConstants.IS_DEV_ENV) {
com.tiedup.remake.rig.TiedUpRigConstants.LOGGER.warn(
"correctRootJoint no-op appelé (Phase 0 stub) — si ActionAnimation jouée, "
+ "sliding visuel attendu. Voir docs/plans/rig/PHASE0_DEGRADATIONS.md D-07."
);
}
}
}

View File

@@ -6,6 +6,9 @@
package com.tiedup.remake.rig.patch;
import javax.annotation.Nullable;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Mob;
/**
@@ -14,4 +17,17 @@ import net.minecraft.world.entity.Mob;
* et stopper la navigation pendant une animation. Version complète Phase 2.
*/
public abstract class MobPatch<T extends Mob> extends LivingEntityPatch<T> {
/**
* Override conforme à EF {@code yesman.epicfight.world.capabilities.entitypatch.MobPatch:171-174}.
* Sans cet override, {@code MoveCoordFunctions.MOB_ATTACK_TARGET_LOOK} recevrait la sémantique
* de base {@link LivingEntityPatch#getTarget()} = {@code getLastHurtMob()} (dernier mob qui m'a
* frappé) au lieu de {@code Mob.getTarget()} (cible AI courante) → NPC ne tourne pas vers sa
* cible pendant une attack animation.
*/
@Override
@Nullable
public LivingEntity getTarget() {
return this.original != null ? this.original.getTarget() : null;
}
}