-
Notifications
You must be signed in to change notification settings - Fork 175
Open
Description
The following code completely ignores the fps of the model sequence if the number of frames is 1, effectively treating the sequence like if it had fps = 1.
hlsdk-portable/dlls/animation.cpp
Lines 250 to 260 in e530099
| if( pseqdesc->numframes > 1 ) | |
| { | |
| *pflFrameRate = 256.0f * pseqdesc->fps / ( pseqdesc->numframes - 1 ); | |
| *pflGroundSpeed = sqrt( pseqdesc->linearmovement[0] * pseqdesc->linearmovement[0] + pseqdesc->linearmovement[1] * pseqdesc->linearmovement[1] + pseqdesc->linearmovement[2] * pseqdesc->linearmovement[2] ); | |
| *pflGroundSpeed = *pflGroundSpeed * pseqdesc->fps / ( pseqdesc->numframes - 1 ); | |
| } | |
| else | |
| { | |
| *pflFrameRate = 256.0f; | |
| *pflGroundSpeed = 0.0f; | |
| } |
It means, for example, playing the animation of 1 frame and 30 fps is slower than playing animation of 2 frames and 2 fps.
Known affected entities: voltigore in Opposing Force appears to be "stuck" in flinch animation for the full second despite it having only 1 frame and 30 fps. Basically the sequence is intended to play the pain sound via animation event, but not "freezing" the voltigore.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels