2015-12-06 17:13:04 +00:00
|
|
|
#ifndef GAME_MWWORLD_CELLVISITORS_H
|
|
|
|
#define GAME_MWWORLD_CELLVISITORS_H
|
2011-01-29 13:33:44 +00:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2014-01-01 21:37:52 +00:00
|
|
|
#include "ptr.hpp"
|
2011-01-29 13:33:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
2015-12-06 17:13:04 +00:00
|
|
|
struct ListAndResetObjectsVisitor
|
2011-01-29 13:33:44 +00:00
|
|
|
{
|
2015-05-12 01:02:15 +00:00
|
|
|
std::vector<MWWorld::Ptr> mObjects;
|
2011-01-29 13:33:44 +00:00
|
|
|
|
2014-01-01 21:37:52 +00:00
|
|
|
bool operator() (MWWorld::Ptr ptr)
|
2011-01-29 13:33:44 +00:00
|
|
|
{
|
2015-05-12 01:02:15 +00:00
|
|
|
if (ptr.getRefData().getBaseNode())
|
|
|
|
{
|
|
|
|
ptr.getRefData().setBaseNode(NULL);
|
|
|
|
mObjects.push_back (ptr);
|
|
|
|
}
|
2013-04-17 15:05:54 +00:00
|
|
|
|
2011-01-29 13:33:44 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|