craftablescience / VPKEdit

A CLI/GUI tool to create, read, and write several pack file formats.
https://developer.valvesoftware.com/wiki/VPKEdit
MIT License
251 stars 19 forks source link

Animated VTFs skip the first frame and duplicate the last frame #125

Closed vrad-exe closed 7 months ago

vrad-exe commented 7 months ago

Describe the Bug

When viewing an animated VTF, the first frame appears to be skipped and the last frame appears to be listed twice. Specifically I noticed this with Portal 2's materials/vgui/spinner.vtf

To Reproduce

  1. Open an animated VTF like the one above
  2. Click through the frames of the animation

Operating System

Tested on Windows 10

craftablescience commented 7 months ago

Thanks for making this issue, not only was there an off-by-one error on both the face and frame spinners I also found out the face spinner was completely nonfunctional