Added GetPlayerFollowers() to EnderalSE.dll
This commit is contained in:
parent
3073987a97
commit
655d84bc41
BIN
SKSE/Plugins/EnderalSE.dll
(Stored with Git LFS)
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…
Reference in New Issue
Block a user