Skip to content

Commit

Permalink
brfMesh: Also swap the times of each frame around (set the timing of …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
Swyter committed May 18, 2024
1 parent 5bfc7f6 commit 9596ed3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions brfMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> timings;
GetTimings(timings);
std::reverse(timings.begin(), timings.end());
SetTimings(timings);

return true;
}

0 comments on commit 9596ed3

Please sign in to comment.