remove s18+ storm effect, fix teams on all versions, fix a crash, fix 1.11 restarting
This commit is contained in:
Milxnor
2023-04-23 11:04:06 -04:00
parent 5da8485485
commit 58bd340501
24 changed files with 500 additions and 99 deletions

View File

@@ -565,7 +565,7 @@ void AFortPlayerController::ServerAttemptInteractHook(UObject* Context, FFrame*
void AFortPlayerController::ServerAttemptAircraftJumpHook(AFortPlayerController* PC, FRotator ClientRotation)
{
auto PlayerController = Cast<AFortPlayerController>(Engine_Version < 424 ? PC : ((UActorComponent*)PC)->GetOwner());
auto PlayerController = Cast<AFortPlayerControllerAthena>(Engine_Version < 424 ? PC : ((UActorComponent*)PC)->GetOwner());
if (Engine_Version < 424 && !Globals::bLateGame.load())
return ServerAttemptAircraftJumpOriginal(PC, ClientRotation);
@@ -595,6 +595,13 @@ void AFortPlayerController::ServerAttemptAircraftJumpHook(AFortPlayerController*
auto NewPawnAsFort = Cast<AFortPawn>(NewPawn);
if (Fortnite_Version >= 18)
{
static auto StormEffectClass = FindObject<UClass>("/Game/Athena/SafeZone/GE_OutsideSafeZoneDamage.GE_OutsideSafeZoneDamage_C");
auto PlayerState = PlayerController->GetPlayerStateAthena();
PlayerState->GetAbilitySystemComponent()->RemoveActiveGameplayEffectBySourceEffect(StormEffectClass, 1, PlayerState->GetAbilitySystemComponent());
}
if (NewPawnAsFort)
{
NewPawnAsFort->SetHealth(100);