Phase 1 polish : SMELL-001, DOC-001, TEST-001 fixes
Résout les 3 items remontés par la review globale pré-Phase 2 :
SMELL-001 — TiedUpRigConstants.ANIMATOR_PROVIDER
Le ternaire retournait ServerAnimator::getAnimator dans les 2 branches
alors que ClientAnimator est maintenant forké (présent dans rig/anim/client/).
Switch vers ClientAnimator::getAnimator côté client (pattern lazy method-ref
préserve la non-chargement sur serveur dédié).
DOC-001 — AnimationManager:211
Commentaire ambigu "SkillManager.reloadAllSkillsAnimations() strippé"
clarifié : préciser que l'appel upstream EF venait de yesman.epicfight.skill.*
et que le combat system est hors scope TiedUp.
TEST-001 — GltfToSkinnedMeshTest coverage gaps
Tests précédents utilisaient [1,0,0,0] → drop trivial, renorm no-op.
Ajoute 3 tests :
- convertDropsLowestWeightAndRenormalizes : poids [0.5, 0.3, 0.15, 0.05]
force le drop du plus faible (0.05) + renorm des 3 restants.
- convertHandlesZeroWeightVertex : weights tous-zéro → fallback Root w=1.
- convertFallsBackToRootForUnknownJointName : joint GLB inconnu ("TentacleJoint42")
→ log WARN + fallback Root id=0 sans crash.
11 tests bridge GREEN (5 alias + 6 convert). Compile BUILD SUCCESSFUL.
This commit is contained in:
@@ -54,17 +54,17 @@ public final class TiedUpRigConstants {
|
||||
|
||||
/**
|
||||
* Factory lazy : crée un Animator approprié au side runtime courant.
|
||||
* Client → ClientAnimator (à créer Phase 2)
|
||||
* Server → ServerAnimator (forké verbatim EF)
|
||||
* Client → {@link com.tiedup.remake.rig.anim.client.ClientAnimator#getAnimator}
|
||||
* Server → {@link ServerAnimator#getAnimator} (forké verbatim EF)
|
||||
*
|
||||
* <p><b>Note Phase 0</b> : ClientAnimator n'est pas encore forké/créé
|
||||
* (Phase 2). Tant que c'est le cas, on retourne ServerAnimator des deux
|
||||
* côtés. Remplacer par {@code ClientAnimator::getAnimator} quand
|
||||
* disponible.</p>
|
||||
* <p>Pattern lazy method-ref : {@code ClientAnimator::getAnimator} n'est
|
||||
* chargé que si {@link #isPhysicalClient()} est true. Sur serveur dédié,
|
||||
* la classe client n'est jamais référencée, donc jamais chargée → pas de
|
||||
* {@code NoClassDefFoundError}.</p>
|
||||
*/
|
||||
public static final Function<LivingEntityPatch<?>, Animator> ANIMATOR_PROVIDER =
|
||||
isPhysicalClient()
|
||||
? ServerAnimator::getAnimator // TODO Phase 2 : ClientAnimator::getAnimator
|
||||
? com.tiedup.remake.rig.anim.client.ClientAnimator::getAnimator
|
||||
: ServerAnimator::getAnimator;
|
||||
|
||||
private TiedUpRigConstants() {}
|
||||
|
||||
@@ -208,7 +208,8 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
}
|
||||
});
|
||||
|
||||
// RIG : SkillManager.reloadAllSkillsAnimations() strippé (combat skills).
|
||||
// RIG : upstream EF appelait ici yesman.epicfight.skill.SkillManager.reloadAllSkillsAnimations()
|
||||
// (re-link des animations aux Skills Java). Combat system hors scope TiedUp → appel strippé.
|
||||
|
||||
this.animations.entrySet().stream()
|
||||
.reduce(
|
||||
|
||||
Reference in New Issue
Block a user