Closed fergushev closed 1 year ago
Sequence frame test code:
int previousSeqFrame = -1;
std::string animName = player->pGfxAnimData->szAnimDataName;
if (player->nSeqFrame &&
(animName == "BAGH1ST" || animName == "BAGH1JS" || animName == "BAGH1JT"))
{
if (player->nSeqFrame != previousSeqFrame)
{
if (player->bActionFrame)
{
PrintText(4, "nSeqFrame:%i actionFrame:%i rate:%i", player->nSeqFrame, player->bActionFrame, player->wFrameRate);
}
else
{
PrintText(1, "nSeqFrame:%i rate:%i", player->nSeqFrame, player->wFrameRate);
}
previousSeqFrame = player->nSeqFrame;
}
}
This first pass supports Strafe, Fend, Zeal, and Dragon Talon. Fury requires Druid wereform updates (their IAS works differently from normal)
Some notes from my testing:
Frame 0 is included in the attack animation, at the beginning (shocker). This is why you'll see a difference in frames if you compare it to the PoD calculator for example (they seem to add frame 0 onto the end for some reason). For example, both our calc and the PoD calc show 14 frames for a basic Pally attack, and you can only reach 14 frames if you include frame 0.
And speaking of frame 0, there seems to be some misunderstood behaviors in the community around it. Namely that consecutive attacks will be 1 frame faster because the final frame of attack 1 will carry over to attack 2. This doesn't appear to be the case. I tested 10 attacks in a row and they all had the same number of frames.
Having said that, in rare cases frame 0 does seem to get skipped. I haven't been able to figure out why it happens but I know it isn't from consecutive attacks because it can happen on the first attack in a chain. Maybe it gets skipped if the idle animation frame 0 would happen at the same time? Hard to say. May also just be an artifact from my test setup.
10WSM crossbow has some interesting breakpoints
So the total number of frames in the animation doesn't change, but the first hit happens a frame sooner.
This is the code I used for testing. I put it inside of
MapNotify::OnDraw()
since it's always looping. It'll print out the frames only when using specific animations (otherwise you just get spammed with idle and running animation frames)Here's another example with Zeal at the fastest breakpoint: (end wall-of-text)