ousnius / nifly

C++ NIF library for the Gamebryo/NetImmerse File Format
GNU General Public License v3.0
52 stars 23 forks source link

NifFile::SetVertsForShape resets shape's flags under certain conditions #29

Closed gavrant closed 2 years ago

gavrant commented 2 years ago

NifFile::SetVertsForShape calls BSTriShape::Create if shape is a BSTriShape and the size of verts does not match the old number of vertices. And the first thing BSTriShape::Create does is flags = 14; So in my case it resulted in the flags switching to 14 seemingly out of nowhere when I added a vertex here, deleted a vertex there in already existing files/shapes.

ousnius commented 2 years ago

BSTriShape::flags is now initialized with a value of 14 in the constructor instead of in BSTriShape::Create