mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 10:23:51 +00:00
2d0840cb3a
This commit changes the style of tes3mp serverside scripting mods. Short list of changes: * Break compatibility with old server mods * OOP style lua API * Basic dependency checker, allowing the installation of multiple server mods without changing configs * Remove support for C++ plugins * Change outdated LuaBridge to [sol2](https://github.com/ThePhD/sol2); * Support GCC, Clang and MSVC compilers * New environment variables: "TES3MP_SERVER_DIR" and "TES3MP_SERVER_USERDIR"; * New entity "Command controller" for registering new chat commands; * New Event system * Simplified Timer API * All Lua mods now run in their own environments * Add global namespace - Data that can be used for communicating between mods * Player and Actor inherit base class NetActor
72 lines
1.3 KiB
C++
72 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;
|
|
|
|
unsigned int count;
|
|
|
|
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
|