forked from mirror/openmw-tes3mp
[Server] Create ActorFunctions placeholder
parent
4f3d05eed2
commit
a24ef3a25e
@ -0,0 +1,28 @@
|
|||||||
|
#include <regex>
|
||||||
|
|
||||||
|
#include <apps/openmw-mp/Player.hpp>
|
||||||
|
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||||
|
#include <apps/openmw-mp/Networking.hpp>
|
||||||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||||
|
#include <components/openmw-mp/Base/BaseActor.hpp>
|
||||||
|
#include "Actors.hpp"
|
||||||
|
|
||||||
|
using namespace mwmp;
|
||||||
|
|
||||||
|
ActorList actorList;
|
||||||
|
BaseActor tempActor;
|
||||||
|
|
||||||
|
void ActorFunctions::InitActorList(unsigned short pid) noexcept
|
||||||
|
{
|
||||||
|
Player *player;
|
||||||
|
GET_PLAYER(pid, player, );
|
||||||
|
|
||||||
|
actorList.cell.blank();
|
||||||
|
actorList.baseActors.clear();
|
||||||
|
actorList.guid = player->guid;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int ActorFunctions::GetActorListSize() noexcept
|
||||||
|
{
|
||||||
|
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.count;
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef OPENMW_ACTORFUNCTIONS_HPP
|
||||||
|
#define OPENMW_ACTORFUNCTIONS_HPP
|
||||||
|
|
||||||
|
#define ACTORAPI \
|
||||||
|
{"InitActorList", ActorFunctions::InitActorList},\
|
||||||
|
\
|
||||||
|
{"GetActorListSize", ActorFunctions::GetActorListSize}
|
||||||
|
|
||||||
|
class ActorFunctions
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
static void InitActorList(unsigned short pid) noexcept;
|
||||||
|
|
||||||
|
static unsigned int GetActorListSize() noexcept;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //OPENMW_ACTORFUNCTIONS_HPP
|
Loading…
Reference in New Issue