You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
633 B
C++
34 lines
633 B
C++
#ifndef GAME_MWWORLD_CELLFUNCTORS_H
|
|
#define GAME_MWWORLD_CELLFUNCTORS_H
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
#include "ptr.hpp"
|
|
|
|
namespace ESM
|
|
{
|
|
class CellRef;
|
|
}
|
|
|
|
namespace MWWorld
|
|
{
|
|
/// List all (Ogre-)handles, then reset RefData::mBaseNode to 0.
|
|
struct ListAndResetHandles
|
|
{
|
|
std::vector<Ogre::SceneNode*> mHandles;
|
|
|
|
bool operator() (MWWorld::Ptr ptr)
|
|
{
|
|
Ogre::SceneNode* handle = ptr.getRefData().getBaseNode();
|
|
if (handle)
|
|
mHandles.push_back (handle);
|
|
|
|
ptr.getRefData().setBaseNode(0);
|
|
return true;
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif
|