mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#ifndef GAME_MWMECHANICS_ACTORS_H
|
|
#define GAME_MWMECHANICS_ACTORS_H
|
|
|
|
#include <set>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
namespace Ogre
|
|
{
|
|
class Vector3;
|
|
}
|
|
|
|
namespace MWWorld
|
|
{
|
|
class Environment;
|
|
}
|
|
|
|
namespace MWMechanics
|
|
{
|
|
class Actors
|
|
{
|
|
MWWorld::Environment& mEnvironment;
|
|
std::set<MWWorld::Ptr> mActors;
|
|
float mDuration;
|
|
|
|
void updateActor (const MWWorld::Ptr& ptr, float duration);
|
|
|
|
void updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused);
|
|
|
|
public:
|
|
|
|
Actors (MWWorld::Environment& environment);
|
|
|
|
void addActor (const MWWorld::Ptr& ptr);
|
|
///< Register an actor for stats management
|
|
|
|
void removeActor (const MWWorld::Ptr& ptr);
|
|
///< Deregister an actor for stats management
|
|
|
|
void dropActors (const MWWorld::Ptr::CellStore *cellStore);
|
|
///< Deregister all actors in the given cell.
|
|
|
|
void update (std::vector<std::pair<std::string, Ogre::Vector3> >& movement,
|
|
float duration, bool paused);
|
|
///< Update actor stats and store desired velocity vectors in \a movement
|
|
};
|
|
}
|
|
|
|
#endif
|