mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 20:53:51 +00:00
f35d35741e
Remove BaseEvent::worldObjectCount Remove BaseActor::count Use foreach loops in packets and processors Remove redundant "&" in CellController::get().getCell() calls
70 lines
1.3 KiB
C++
70 lines
1.3 KiB
C++
#ifndef OPENMW_BASEACTOR_HPP
|
|
#define OPENMW_BASEACTOR_HPP
|
|
|
|
#include <components/esm/loadcell.hpp>
|
|
|
|
#include <components/openmw-mp/Base/BaseStructs.hpp>
|
|
#include <components/openmw-mp/Base/BaseNetCreature.hpp>
|
|
|
|
#include <RakNetTypes.h>
|
|
#include <memory>
|
|
|
|
namespace mwmp
|
|
{
|
|
class BaseActor : public BaseNetCreature
|
|
{
|
|
public:
|
|
|
|
BaseActor()
|
|
{
|
|
hasPositionData = false;
|
|
hasStatsDynamicData = false;
|
|
refNumIndex = 0;
|
|
mpNum = 0;
|
|
drawState = 0;
|
|
isFlying = false;
|
|
}
|
|
|
|
std::string refId;
|
|
int refNumIndex;
|
|
int mpNum;
|
|
|
|
std::string response;
|
|
std::string sound;
|
|
|
|
Animation animation;
|
|
|
|
bool hasPositionData;
|
|
bool hasStatsDynamicData;
|
|
};
|
|
|
|
class BaseActorList
|
|
{
|
|
public:
|
|
|
|
BaseActorList()
|
|
{
|
|
cell.blank();
|
|
}
|
|
|
|
enum ACTOR_ACTION
|
|
{
|
|
SET = 0,
|
|
ADD = 1,
|
|
REMOVE = 2,
|
|
REQUEST = 3
|
|
};
|
|
|
|
RakNet::RakNetGUID guid;
|
|
|
|
std::vector<std::shared_ptr<BaseActor>> baseActors;
|
|
|
|
ESM::Cell cell;
|
|
|
|
unsigned char action; // 0 - Clear and set in entirety, 1 - Add item, 2 - Remove item, 3 - Request items
|
|
|
|
bool isValid;
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_BASEACTOR_HPP
|