mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
respawning on older versions
fixed respawning on pre s6, fixed a crash for some s5 builds, work on ai a bit, start on blueprint decompiler
This commit is contained in:
@@ -1,5 +1,38 @@
|
||||
#include "FortPlayerState.h"
|
||||
|
||||
void AFortPlayerState::EndDBNOAbilities()
|
||||
{
|
||||
static auto GAB_AthenaDBNOClass = FindObject<UClass>(L"/Game/Abilities/NPC/Generic/GAB_AthenaDBNO.Default__GAB_AthenaDBNO_C");
|
||||
|
||||
auto ASC = this->GetAbilitySystemComponent();
|
||||
|
||||
if (!ASC)
|
||||
return;
|
||||
|
||||
FGameplayAbilitySpec* DBNOSpec = nullptr;
|
||||
|
||||
UObject* ClassToFind = GAB_AthenaDBNOClass->ClassPrivate;
|
||||
|
||||
auto compareAbilities = [&DBNOSpec, &ClassToFind](FGameplayAbilitySpec* Spec) {
|
||||
auto CurrentAbility = Spec->GetAbility();
|
||||
|
||||
if (CurrentAbility->ClassPrivate == ClassToFind)
|
||||
{
|
||||
DBNOSpec = Spec;
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
LoopSpecs(ASC, compareAbilities);
|
||||
|
||||
if (!DBNOSpec)
|
||||
return;
|
||||
|
||||
ASC->ClientCancelAbility(DBNOSpec->GetHandle(), DBNOSpec->GetActivationInfo());
|
||||
ASC->ClientEndAbility(DBNOSpec->GetHandle(), DBNOSpec->GetActivationInfo());
|
||||
ASC->ServerEndAbility(DBNOSpec->GetHandle(), DBNOSpec->GetActivationInfo(), nullptr);
|
||||
}
|
||||
|
||||
bool AFortPlayerState::AreUniqueIDsIdentical(FUniqueNetIdRepl* A, FUniqueNetIdRepl* B)
|
||||
{
|
||||
return A->IsIdentical(B);
|
||||
|
||||
Reference in New Issue
Block a user