2017-04-23 10:59:15 +00:00
|
|
|
#ifndef OPENMW_MPCELL_HPP
|
|
|
|
#define OPENMW_MPCELL_HPP
|
2017-04-06 01:00:50 +00:00
|
|
|
|
2017-04-09 13:32:44 +00:00
|
|
|
#include "ActorList.hpp"
|
2017-04-06 01:00:50 +00:00
|
|
|
#include "LocalActor.hpp"
|
|
|
|
#include "DedicatedActor.hpp"
|
|
|
|
#include "../mwworld/cellstore.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class Cell
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
Cell(MWWorld::CellStore* cellStore);
|
|
|
|
|
2017-04-10 14:10:18 +00:00
|
|
|
void updateLocal(bool forceUpdate);
|
2017-04-07 12:51:34 +00:00
|
|
|
void updateDedicated(float dt);
|
2017-04-08 04:46:33 +00:00
|
|
|
|
2017-04-10 14:10:18 +00:00
|
|
|
void readPositions(ActorList& actorList);
|
2017-04-15 07:47:53 +00:00
|
|
|
void readAnimFlags(ActorList& actorList);
|
2017-04-15 10:42:30 +00:00
|
|
|
void readAnimPlay(ActorList& actorList);
|
2017-04-16 13:42:07 +00:00
|
|
|
void readStatsDynamic(ActorList& actorList);
|
2017-05-26 01:37:49 +00:00
|
|
|
void readEquipment(ActorList& actorList);
|
2017-04-16 15:43:13 +00:00
|
|
|
void readSpeech(ActorList& actorList);
|
2017-04-19 19:10:06 +00:00
|
|
|
void readAttack(ActorList& actorList);
|
2017-04-23 10:59:15 +00:00
|
|
|
void readCellChange(ActorList& actorList);
|
2017-04-08 07:58:25 +00:00
|
|
|
|
2017-04-23 10:59:15 +00:00
|
|
|
void initializeLocalActor(const MWWorld::Ptr& ptr);
|
2017-04-06 01:00:50 +00:00
|
|
|
void initializeLocalActors();
|
2017-04-23 10:59:15 +00:00
|
|
|
|
|
|
|
void initializeDedicatedActor(const MWWorld::Ptr& ptr);
|
2017-04-10 14:10:18 +00:00
|
|
|
void initializeDedicatedActors(ActorList& actorList);
|
|
|
|
|
2017-04-06 01:59:55 +00:00
|
|
|
void uninitializeLocalActors();
|
2017-04-08 04:46:33 +00:00
|
|
|
void uninitializeDedicatedActors();
|
|
|
|
|
2017-04-07 07:16:23 +00:00
|
|
|
virtual LocalActor *getLocalActor(std::string actorIndex);
|
2017-04-08 04:46:33 +00:00
|
|
|
virtual DedicatedActor *getDedicatedActor(std::string actorIndex);
|
2017-04-07 07:16:23 +00:00
|
|
|
|
2017-05-04 23:46:16 +00:00
|
|
|
bool hasLocalAuthority();
|
|
|
|
void setAuthority(const RakNet::RakNetGUID& guid);
|
|
|
|
|
2017-04-06 01:00:50 +00:00
|
|
|
MWWorld::CellStore* getCellStore();
|
|
|
|
std::string getDescription();
|
|
|
|
|
2017-05-04 23:46:16 +00:00
|
|
|
bool shouldInitializeActors;
|
|
|
|
|
2017-04-06 01:00:50 +00:00
|
|
|
private:
|
|
|
|
MWWorld::CellStore* store;
|
2017-05-04 23:46:16 +00:00
|
|
|
RakNet::RakNetGUID authorityGuid;
|
|
|
|
|
2017-04-10 14:10:18 +00:00
|
|
|
std::map<std::string, LocalActor *> localActors;
|
|
|
|
std::map<std::string, DedicatedActor *> dedicatedActors;
|
2017-06-10 00:29:51 +00:00
|
|
|
|
|
|
|
float updateTimer;
|
2017-04-06 01:00:50 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-04-23 10:59:15 +00:00
|
|
|
#endif //OPENMW_MPCELL_HPP
|