diff --git a/src/engine/model/animmodel.h b/src/engine/model/animmodel.h index c9923d1f..1335b65a 100644 --- a/src/engine/model/animmodel.h +++ b/src/engine/model/animmodel.h @@ -644,13 +644,20 @@ class animmodel : public model bool calcanim(int animpart, int anim, int basetime, int basetime2, dynent *d, int interp, animinfo &info, int &animinterptime) const; }; - std::vector parts; + std::vector parts; //vector of part objects heap-allocated by skelmodel::addpart or part::addpart //ordinary methods ~animmodel(); animmodel(const animmodel& a) = delete; animmodel &operator=(const animmodel &a) = delete; + /** + * @brief Creates a heap-allocated part object. + * + * This must be `delete`'d or it will cause a memory leak. + * + * @return a reference to the newly created part + */ part &addpart(); /** * @brief Sets up a transformation matrix based on this model's rotation, translation, and scale