1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
OpenMW/apps/openmw/mwmechanics/objects.hpp
Arthur Moore 5e6fcc2aef Alert the user if attempting to play an animation fails
This is mostly propogating the error up the stack so the game can do something about it.
Working on avoiding log spam from calling an animation that doesn't exist every frame.
2015-07-30 08:00:26 -04:00

49 lines
1.2 KiB
C++

#ifndef GAME_MWMECHANICS_ACTIVATORS_H
#define GAME_MWMECHANICS_ACTIVATORS_H
#include <string>
#include <map>
#include "character.hpp"
namespace MWWorld
{
class Ptr;
class CellStore;
}
namespace MWMechanics
{
class Objects
{
typedef std::map<MWWorld::Ptr,CharacterController*> PtrControllerMap;
PtrControllerMap mObjects;
public:
Objects();
~Objects();
void addObject (const MWWorld::Ptr& ptr);
///< Register an animated object
void removeObject (const MWWorld::Ptr& ptr);
///< Deregister an object
void updateObject(const MWWorld::Ptr &old, const MWWorld::Ptr& ptr);
///< Updates an object with a new Ptr
void dropObjects(const MWWorld::CellStore *cellStore);
///< Deregister all objects in the given cell.
void update(float duration, bool paused);
///< Update object animations
bool playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number);
void skipAnimation(const MWWorld::Ptr& ptr);
void getObjectsInRange (const osg::Vec3f& position, float radius, std::vector<MWWorld::Ptr>& out);
};
}
#endif