From 9596ed38b4174ad6cbd25cc8d53f6fb5369601dd Mon Sep 17 00:00:00 2001 From: Swyter Date: Sat, 18 May 2024 23:38:25 +0200 Subject: [PATCH] brfMesh: Also swap the times of each frame around (set the timing of the first to the last one and so on); reverse the frame times of vertex animations in meshes. Previously we swapped the frame order but the times of each frame were kept the same, so they also appeared backwards. --- brfMesh.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/brfMesh.cpp b/brfMesh.cpp index bf77a81..8ba8070 100644 --- a/brfMesh.cpp +++ b/brfMesh.cpp @@ -3471,6 +3471,14 @@ bool BrfMesh::reverseVertexAni(){ return false; std::reverse(frame.begin(), frame.end()); + + /* swy: also swap the times of each frame around (set the timing of the first to the last one and so on); + I don't know if keeping them as-is after reversing is useful, who knows. + skeletal anims don't need seem to need this */ + std::vector timings; + GetTimings(timings); + std::reverse(timings.begin(), timings.end()); + SetTimings(timings); return true; } \ No newline at end of file