Some Event Fixes, 18.10 Crash fix, random crash after a few minutes for s17+

This commit is contained in:
ILoveTacosFromJITB
2024-01-15 13:25:52 -08:00
parent af1fc0f236
commit b0901b9659
7 changed files with 418 additions and 8 deletions

View File

@@ -159,7 +159,20 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
auto& StartingItems = ((AFortGameModeAthena*)GameMode)->GetStartingItems();
NewPlayerAsAthena->AddPickaxeToInventory();
if (Globals::bGoingToPlayEvent && Fortnite_Version >= 16.00)
{
auto WID = Cast<UFortWorldItemDefinition>(FindObject("WID_EventMode_Activator", nullptr, ANY_PACKAGE)); // Empty Hands
bool bShouldUpdate = false;
WorldInventory->AddItem(WID, &bShouldUpdate, 1);
if (bShouldUpdate)
WorldInventory->Update();
}
else
{
NewPlayerAsAthena->AddPickaxeToInventory();
}
for (int i = 0; i < StartingItems.Num(); ++i)
{