openmw-tes3coop/apps/openmw/mwmp/CellController.hpp

47 lines
1.3 KiB
C++
Raw Normal View History

#ifndef OPENMW_CELLCONTROLLER_HPP
#define OPENMW_CELLCONTROLLER_HPP
2017-04-06 01:00:50 +00:00
#include "Cell.hpp"
#include "WorldEvent.hpp"
#include "LocalActor.hpp"
#include "DedicatedActor.hpp"
2016-12-16 09:27:19 +00:00
#include "../mwworld/cellstore.hpp"
namespace mwmp
{
class CellController
{
public:
CellController();
~CellController();
void updateLocal();
void updateDedicated(float dt);
void initializeCellLocal(const ESM::Cell& cell);
void readCellFrame(mwmp::WorldEvent& worldEvent);
void setLocalActorRecord(std::string actorIndex, std::string cellIndex);
void removeLocalActorRecord(std::string actorIndex);
bool hasLocalActorRecord(MWWorld::Ptr ptr);
virtual LocalActor *getLocalActor(MWWorld::Ptr ptr);
std::string generateMapIndex(MWWorld::Ptr ptr);
std::string generateMapIndex(mwmp::WorldObject object);
int getCellSize() const;
virtual MWWorld::CellStore *getCell(const ESM::Cell& cell);
2016-12-16 09:27:19 +00:00
void openContainer(const MWWorld::Ptr& container, bool loot);
void closeContainer(const MWWorld::Ptr& container);
private:
static std::map<std::string, mwmp::Cell *> cellsActive;
static std::map<std::string, std::string> localActorsToCells;
};
}
#endif //OPENMW_CELLCONTROLLER_HPP