1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/apps/openmw/mwmechanics/creaturecustomdataresetter.hpp

21 lines
401 B
C++

#ifndef OPENMW_MWMECHANICS_CREATURECUSTOMDATARESETTER_H
#define OPENMW_MWMECHANICS_CREATURECUSTOMDATARESETTER_H
#include "../mwworld/ptr.hpp"
namespace MWMechanics
{
struct CreatureCustomDataResetter
{
MWWorld::Ptr mPtr;
~CreatureCustomDataResetter()
{
if (!mPtr.isEmpty())
mPtr.getRefData().setCustomData({});
}
};
}
#endif