1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-19 16:39:41 +00:00
openmw-tes3mp/apps/openmw/mwmp/Player.hpp

41 lines
978 B
C++
Raw Normal View History

2016-01-04 12:15:55 +00:00
//
// Created by koncord on 02.01.16.
//
#ifndef OPENMW_PLAYER_HPP
#define OPENMW_PLAYER_HPP
2016-01-04 12:17:30 +00:00
#include <components/esm/loadnpc.hpp>
#include <apps/openmw/mwworld/manualref.hpp>
#include <map>
#include <apps/openmw/mwmechanics/aisequence.hpp>
2016-01-04 12:15:55 +00:00
2016-01-04 12:17:30 +00:00
namespace mwmp
2016-01-04 12:15:55 +00:00
{
2016-01-04 12:17:30 +00:00
class Player
{
public:
MWWorld::Ptr getPtr();
MWWorld::Ptr getLiveCellPtr();
MWWorld::ManualRef* getRef();
void Move(ESM::Position pos, MWWorld::CellStore* cell);
2016-01-04 12:15:55 +00:00
2016-01-04 12:17:30 +00:00
static void CreatePlayer(int id, const std::string& name, const std::string &race, const std::string &head, const std::string &hair);
static void DestroyPlayer(int id);
static void CleanUp();
static Player *GetPlayer(int id);
2016-01-04 12:15:55 +00:00
2016-01-04 12:17:30 +00:00
private:
Player();
~Player();
int id;
bool active;
MWWorld::ManualRef* reference;
MWWorld::Ptr ptr;
2016-01-04 12:15:55 +00:00
2016-01-04 12:17:30 +00:00
private:
static std::map <int, Player*> players;
};
}
2016-01-04 12:15:55 +00:00
#endif //OPENMW_PLAYER_HPP