4
Fork 0

Added GetPlayerFollowers() to EnderalSE.dll

master
Eddoursul 2 years ago
parent 3073987a97
commit 655d84bc41
  1. BIN
      SKSE/Plugins/EnderalSE.dll
  2. BIN
      scripts/enderalfunctions.pex
  3. 17
      source/Enderal DLL/src/PapyrusFunctions.h
  4. 2
      source/scripts/enderalfunctions.psc

BIN
SKSE/Plugins/EnderalSE.dll (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

@ -47,6 +47,21 @@ namespace Papyrus::PapyrusFunctions
return refr ? refr.get() : nullptr;
}
inline std::vector<RE::Actor*> GetPlayerFollowers(RE::StaticFunctionTag*)
{
std::vector<RE::Actor*> result;
if (const auto processLists = RE::ProcessLists::GetSingleton(); processLists) {
for (auto& actorHandle : processLists->highActorHandles) {
if (auto actor = actorHandle.get(); actor && actor->IsPlayerTeammate() && !actor->IsDead() && !actor->IsDisabled()) {
result.push_back(actor.get());
}
}
}
return result;
}
inline void Bind(VM& a_vm)
{
BIND(CreatePotion);
@ -55,5 +70,7 @@ namespace Papyrus::PapyrusFunctions
logger::info("Registered GetNewGameCount"sv);
BIND(GetCurrentContainer);
logger::info("Registered GetCurrentContainer"sv);
BIND(GetPlayerFollowers);
logger::info("Registered GetPlayerFollowers"sv);
}
}

@ -8,6 +8,8 @@ ObjectReference function GetCurrentContainer() native global
int function GetNewGameCount() native global
Actor[] function GetPlayerFollowers() native global
bool function IsDLLLoaded() global
int iVer = SKSE.GetPluginVersion("EnderalSE")
return iVer > 0

Loading…
Cancel
Save