fix 7.20, >2.5 emoting, fix removing item bug on >2.5, fix equipping being buggy on >2.5, added ammo depletion to 1.11+
This commit is contained in:
Milxnor
2023-04-02 16:38:53 -04:00
parent c6bbaccf7f
commit ffbba9e9a4
12 changed files with 181 additions and 39 deletions

View File

@@ -34,5 +34,18 @@ char UFortInventoryInterface::RemoveInventoryItemHook(__int64 a1, FGuid a2, int
if (bShouldUpdate)
WorldInventory->Update();
if (Engine_Version < 424)
{
auto Pawn = PlayerController->GetMyFortPawn();
if (Pawn)
{
auto CurrentWeapon = Pawn->GetCurrentWeapon();
if (CurrentWeapon)
WorldInventory->CorrectLoadedAmmo(CurrentWeapon->GetItemEntryGuid(), CurrentWeapon->GetAmmoCount());
}
}
return true;
}