1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00
OpenMW/apps/openmw/mwworld/cellvisitors.hpp
2015-12-06 18:13:04 +01:00

30 lines
516 B
C++

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