@@ -170,30 +170,29 @@ ProtoMesh::ProtoMesh(const phoenix::model &library, std::unique_ptr<Skeleton>&&
170170
171171ProtoMesh::ProtoMesh (const phoenix::model_hierarchy& library, std::unique_ptr<Skeleton>&& sk, std::string_view fname)
172172 :skeleton(std::move(sk)), fname(fname) {
173-
174173 nodes.resize (skeleton == nullptr ? 0 : skeleton->nodes .size ());
175- for (size_t i = 0 ; i < nodes.size (); ++i) {
174+ for (size_t i = 0 ; i < nodes.size (); ++i) {
176175 Node& n = nodes[i];
177176 auto & src = skeleton->nodes [i];
178177 n.parentId = src.parent ;
179178 n.transform = src.tr ;
180179 }
181180
182- for (auto & i : nodes)
183- if (i.parentId < nodes.size ())
181+ for (auto & i : nodes)
182+ if (i.parentId < nodes.size ())
184183 nodes[i.parentId ].hasChild = true ;
185184
186185 size_t subCount = 0 ;
187- for (auto & i : nodes) {
186+ for (auto & i : nodes) {
188187 i.submeshIdB = subCount;
189188 i.submeshIdE = subCount;
190189 }
191190 submeshId.resize (subCount);
192191
193- if (skeleton != nullptr ) {
194- for (size_t i = 0 ; i < skeleton->nodes .size (); ++i) {
192+ if (skeleton != nullptr ) {
193+ for (size_t i = 0 ; i < skeleton->nodes .size (); ++i) {
195194 auto & n = skeleton->nodes [i];
196- if (n.name .find (" ZS_POS" ) == 0 ) {
195+ if (n.name .find (" ZS_POS" ) == 0 ) {
197196 Pos p;
198197 p.name = n.name ;
199198 p.node = i;
@@ -213,7 +212,7 @@ ProtoMesh::ProtoMesh(const phoenix::model_mesh& library, std::unique_ptr<Skeleto
213212 auto & att = attach.back ();
214213 att.name = m.first ;
215214 att.shape .reset (PhysicMeshShape::load (std::move (pack)));
216- }
215+ }
217216
218217 nodes.resize (skeleton==nullptr ? 0 : skeleton->nodes .size ());
219218 for (size_t i=0 ;i<nodes.size ();++i) {
0 commit comments