From 392e13ac84ecea3e4c7a1558502eda204acedb88 Mon Sep 17 00:00:00 2001 From: Tazpn <tazpn@users.sourceforge.net> Date: Wed, 13 Jun 2007 01:52:11 +0000 Subject: [PATCH] Add Veryxrv's commit. Still needs investigation to make sure MW and Civ4 are not effected. --- NifExport/Animation.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/NifExport/Animation.cpp b/NifExport/Animation.cpp index 8154228..f19e6eb 100644 --- a/NifExport/Animation.cpp +++ b/NifExport/Animation.cpp @@ -144,6 +144,16 @@ void Exporter::InitializeTimeController(NiTimeControllerRef ctrl, NiNodeRef pare NiNodeRef Exporter::createAccumNode(NiNodeRef parent, INode *node) { + // + //Tweak by veryxRV + // + NiNodeRef root= parent->GetParent(); + NiNodeRef temp; + while(root->GetParent() != NULL) + { + temp= root->GetParent(); + root= temp; + } NiNodeRef accumNode; bool isTracked = isNodeTracked(node); if (!Exporter::mAllowAccum || (!isTracked && !isSkeletonRoot(node))) @@ -178,10 +188,12 @@ NiNodeRef Exporter::createAccumNode(NiNodeRef parent, INode *node) vector<NiNodeRef> children; getChildNodes(node, children); ctrl->SetExtraTargets(children); - Exporter::InitializeTimeController(ctrl, parent); + //Changed parent to root for ingame compatibility + Exporter::InitializeTimeController(ctrl, root); } NiControllerManagerRef mgr = new NiControllerManager(); - Exporter::InitializeTimeController(mgr, parent); + //Changed parent to root for ingame compatibility + Exporter::InitializeTimeController(mgr, root); // Export Animation now doAnimExport(mgr, node); -- GitLab