1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/apps/openmw/mwworld/cellvisitors.hpp
2022-09-22 21:35:26 +03:00

30 lines
520 B
C++

#ifndef GAME_MWWORLD_CELLVISITORS_H
#define GAME_MWWORLD_CELLVISITORS_H
#include <string>
#include <vector>
#include "ptr.hpp"
namespace MWWorld
{
struct ListAndResetObjectsVisitor
{
std::vector<MWWorld::Ptr> mObjects;
bool operator()(const MWWorld::Ptr& ptr)
{
if (ptr.getRefData().getBaseNode())
{
ptr.getRefData().setBaseNode(nullptr);
}
mObjects.push_back(ptr);
return true;
}
};
}
#endif