1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/apps/openmw/mwrender/esm4npcanimation.hpp
elsid 13c8e04b27
Make traits and base data optional for ESM4 NPC
Fallout 3 is not fully supported and it causes failures to load NPCs. Log errors
and make sure there is no nullptr dereference.
2023-12-27 10:07:48 +01:00

32 lines
768 B
C++

#ifndef GAME_RENDER_ESM4NPCANIMATION_H
#define GAME_RENDER_ESM4NPCANIMATION_H
#include "animation.hpp"
namespace ESM4
{
struct Npc;
}
namespace MWRender
{
class ESM4NpcAnimation : public Animation
{
public:
ESM4NpcAnimation(
const MWWorld::Ptr& ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem);
private:
void insertPart(std::string_view model);
// Works for FO3/FONV/TES5
void insertHeadParts(const std::vector<ESM::FormId>& partIds, std::set<uint32_t>& usedHeadPartTypes);
void updateParts();
void updatePartsTES4(const ESM4::Npc& traits);
void updatePartsTES5(const ESM4::Npc& traits);
};
}
#endif // GAME_RENDER_ESM4NPCANIMATION_H