2017-04-30 11:57:43 +00:00
|
|
|
#ifndef OPENMW_PLAYERLIST_HPP
|
|
|
|
#define OPENMW_PLAYERLIST_HPP
|
|
|
|
|
|
|
|
#include <components/esm/custommarkerstate.hpp>
|
|
|
|
#include <components/esm/loadnpc.hpp>
|
|
|
|
#include <components/openmw-mp/Base/BasePlayer.hpp>
|
|
|
|
|
|
|
|
#include "../mwmechanics/aisequence.hpp"
|
|
|
|
|
|
|
|
#include "../mwworld/manualref.hpp"
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <RakNetTypes.h>
|
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
class Actor;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
struct DedicatedPlayer;
|
|
|
|
|
|
|
|
class PlayerList
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
static void update(float dt);
|
|
|
|
|
|
|
|
static DedicatedPlayer *newPlayer(RakNet::RakNetGUID guid);
|
|
|
|
|
2018-04-08 12:02:43 +00:00
|
|
|
static void deletePlayer(RakNet::RakNetGUID guid);
|
2017-04-30 11:57:43 +00:00
|
|
|
static void cleanUp();
|
|
|
|
|
|
|
|
static DedicatedPlayer *getPlayer(RakNet::RakNetGUID guid);
|
|
|
|
static DedicatedPlayer *getPlayer(const MWWorld::Ptr &ptr);
|
2020-08-16 21:56:01 +00:00
|
|
|
static std::vector<RakNet::RakNetGUID> getPlayersInCell(const ESM::Cell& cell);
|
2017-04-30 11:57:43 +00:00
|
|
|
|
|
|
|
static bool isDedicatedPlayer(const MWWorld::Ptr &ptr);
|
|
|
|
|
2019-07-14 19:42:55 +00:00
|
|
|
static void enableMarkers(const ESM::Cell& cell);
|
|
|
|
|
2017-05-30 05:20:45 +00:00
|
|
|
static void clearHitAttemptActorId(int actorId);
|
|
|
|
|
2017-04-30 11:57:43 +00:00
|
|
|
private:
|
|
|
|
|
2019-08-27 06:29:43 +00:00
|
|
|
static std::map<RakNet::RakNetGUID, DedicatedPlayer *> playerList;
|
2017-04-30 11:57:43 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PLAYERLIST_HPP
|