mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 20:49:56 +00:00
29 lines
519 B
C++
29 lines
519 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(nullptr);
|
|
mObjects.push_back (ptr);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif
|