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

@@ -94,16 +94,6 @@ void AFortPlayerController::ServerExecuteInventoryItemHook(AFortPlayerController
if (!ItemDefinition)
return;
if (Engine_Version < 420) // wtf
{
static auto CurrentWeaponListOffset = Pawn->GetOffset("CurrentWeaponList");
auto& CurrentWeaponList = Pawn->Get<TArray<AFortWeapon*>>(CurrentWeaponListOffset);
CurrentWeaponList.Data = nullptr;
CurrentWeaponList.ArrayNum = 0;
CurrentWeaponList.ArrayMax = 0;
}
if (auto Weapon = Pawn->EquipWeaponDefinition((UFortWeaponItemDefinition*)ItemDefinition, ItemInstance->GetItemEntry()->GetItemGuid()))
{
if (Engine_Version < 420)