2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 02.01.16.
|
|
|
|
//
|
|
|
|
|
2017-04-17 15:50:20 +00:00
|
|
|
#ifndef OPENMW_DEDICATEDPLAYER_HPP
|
|
|
|
#define OPENMW_DEDICATEDPLAYER_HPP
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2017-04-17 15:50:20 +00:00
|
|
|
#include <components/esm/custommarkerstate.hpp>
|
2018-04-08 07:56:33 +00:00
|
|
|
#include <components/esm/loadcrea.hpp>
|
2016-01-12 03:41:44 +00:00
|
|
|
#include <components/esm/loadnpc.hpp>
|
2017-04-17 15:50:20 +00:00
|
|
|
#include <components/openmw-mp/Base/BasePlayer.hpp>
|
|
|
|
|
2018-04-08 07:56:33 +00:00
|
|
|
#include "../mwclass/npc.hpp"
|
|
|
|
|
2017-04-17 15:50:20 +00:00
|
|
|
#include "../mwmechanics/aisequence.hpp"
|
|
|
|
|
2016-11-17 15:16:25 +00:00
|
|
|
#include "../mwworld/manualref.hpp"
|
2017-04-17 15:50:20 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
#include <map>
|
|
|
|
#include <RakNetTypes.h>
|
|
|
|
|
2016-11-12 11:39:04 +00:00
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
class Actor;
|
|
|
|
}
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
struct DedicatedPlayer;
|
|
|
|
|
|
|
|
class DedicatedPlayer : public BasePlayer
|
|
|
|
{
|
2017-04-17 16:10:33 +00:00
|
|
|
friend class PlayerList;
|
2017-04-17 15:50:20 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
public:
|
|
|
|
|
2017-04-24 15:38:57 +00:00
|
|
|
void update(float dt);
|
|
|
|
|
2016-11-15 19:54:06 +00:00
|
|
|
void move(float dt);
|
2018-04-08 07:56:33 +00:00
|
|
|
void setBaseInfo();
|
2018-04-08 12:02:43 +00:00
|
|
|
void setShapeshift();
|
2017-05-14 07:52:44 +00:00
|
|
|
void setAnimFlags();
|
2018-04-13 13:59:48 +00:00
|
|
|
void setAttributes();
|
|
|
|
void setSkills();
|
2017-05-14 07:52:44 +00:00
|
|
|
void setEquipment();
|
|
|
|
void setCell();
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-10-22 09:06:26 +00:00
|
|
|
void updateMarker();
|
|
|
|
void removeMarker();
|
2016-10-24 12:10:32 +00:00
|
|
|
void setMarkerState(bool state);
|
2017-04-17 15:50:20 +00:00
|
|
|
|
2017-10-27 06:10:29 +00:00
|
|
|
void playAnimation();
|
2017-10-31 13:19:14 +00:00
|
|
|
void playSpeech();
|
2017-10-27 06:10:29 +00:00
|
|
|
|
2018-04-09 12:23:05 +00:00
|
|
|
void createReference(const std::string& recId);
|
2018-04-08 07:56:33 +00:00
|
|
|
void deleteReference();
|
|
|
|
|
2017-04-17 16:34:32 +00:00
|
|
|
MWWorld::Ptr getPtr();
|
|
|
|
MWWorld::ManualRef* getRef();
|
|
|
|
|
2017-04-23 10:31:06 +00:00
|
|
|
void setPtr(const MWWorld::Ptr& newPtr);
|
2018-04-13 05:37:06 +00:00
|
|
|
void reloadPtr();
|
2017-04-23 10:31:06 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
private:
|
2017-04-17 15:50:20 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
DedicatedPlayer(RakNet::RakNetGUID guid);
|
|
|
|
virtual ~DedicatedPlayer();
|
2017-04-17 16:34:32 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
MWWorld::ManualRef* reference;
|
|
|
|
|
|
|
|
MWWorld::Ptr ptr;
|
2016-10-22 09:06:26 +00:00
|
|
|
|
|
|
|
ESM::CustomMarker marker;
|
|
|
|
bool markerEnabled;
|
2018-04-13 05:37:06 +00:00
|
|
|
|
2018-04-13 13:16:43 +00:00
|
|
|
std::string previousRace;
|
|
|
|
std::string previousCreatureRefId;
|
2018-04-17 12:23:10 +00:00
|
|
|
bool previousDisplayCreatureName;
|
2018-04-13 13:16:43 +00:00
|
|
|
|
2018-04-13 05:37:06 +00:00
|
|
|
std::string creatureRecordId;
|
2016-01-12 03:41:44 +00:00
|
|
|
};
|
|
|
|
}
|
2017-04-17 15:50:20 +00:00
|
|
|
#endif //OPENMW_DEDICATEDPLAYER_HPP
|