mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
fix 16.50, fix failing abilities s16+, ammo in bottom right
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "FortPawn.h"
|
||||
|
||||
#include "reboot.h"
|
||||
#include "FortPlayerControllerAthena.h"
|
||||
|
||||
AFortWeapon* AFortPawn::EquipWeaponDefinition(UFortWeaponItemDefinition* WeaponData, const FGuid& ItemEntryGuid)
|
||||
{
|
||||
@@ -56,6 +57,24 @@ void AFortPawn::SetShield(float NewShield)
|
||||
this->ProcessEvent(SetShieldFn, &NewShield);
|
||||
}
|
||||
|
||||
void AFortPawn::NetMulticast_Athena_BatchedDamageCuesHook(UObject* Context, FFrame* Stack, void* Ret)
|
||||
{
|
||||
auto Pawn = (AFortPawn*)Context;
|
||||
auto Controller = Cast<AFortPlayerController>(Pawn->GetController());
|
||||
auto CurrentWeapon = Pawn->GetCurrentWeapon();
|
||||
auto WorldInventory = Controller ? Controller->GetWorldInventory() : nullptr;
|
||||
|
||||
if (!WorldInventory || !CurrentWeapon)
|
||||
return NetMulticast_Athena_BatchedDamageCuesOriginal(Context, Stack, Ret);
|
||||
|
||||
static auto AmmoCountOffset = CurrentWeapon->GetOffset("AmmoCount");
|
||||
auto AmmoCount = CurrentWeapon->Get<int>(AmmoCountOffset);
|
||||
|
||||
WorldInventory->CorrectLoadedAmmo(CurrentWeapon->GetItemEntryGuid(), AmmoCount);
|
||||
|
||||
return NetMulticast_Athena_BatchedDamageCuesOriginal(Context, Stack, Ret);
|
||||
}
|
||||
|
||||
UClass* AFortPawn::StaticClass()
|
||||
{
|
||||
static auto Class = FindObject<UClass>("/Script/FortniteGame.FortPawn");
|
||||
|
||||
Reference in New Issue
Block a user