Files
Project-Reboot-3.0/Project Reboot 3.0/FortAthenaSupplyDrop.cpp
Milxnor b8275e37f8 a bit
fix some crashes on playlists when restarting, fix large team gamemode teams (kinda), added pickups to minimap
2023-04-23 16:09:56 -04:00

59 lines
3.6 KiB
C++

#include "FortAthenaSupplyDrop.h"
AFortPickup* AFortAthenaSupplyDrop::SpawnPickupFromItemEntryHook(UObject* Context, FFrame& Stack, AFortPickup** Ret)
{
LOG_INFO(LogDev, __FUNCTION__);
return SpawnPickupFromItemEntryOriginal(Context, Stack, Ret);
}
AFortPickup* AFortAthenaSupplyDrop::SpawnGameModePickupHook(UObject* Context, FFrame& Stack, AFortPickup** Ret)
{
UFortWorldItemDefinition* ItemDefinition = nullptr; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
UClass* PickupClass = nullptr; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int NumberToSpawn; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
AFortPawn* TriggeringPawn = nullptr; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FVector Position; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FVector Direction;
Stack.StepCompiledIn(&ItemDefinition);
Stack.StepCompiledIn(&PickupClass);
Stack.StepCompiledIn(&NumberToSpawn);
Stack.StepCompiledIn(&TriggeringPawn);
Stack.StepCompiledIn(&Position);
Stack.StepCompiledIn(&Direction);
SpawnGameModePickupOriginal(Context, Stack, Ret);
if (!ItemDefinition || !PickupClass)
return nullptr;
LOG_INFO(LogDev, "Spawning GameModePickup with ItemDefinition: {}", ItemDefinition->GetFullName());
*Ret = AFortPickup::SpawnPickup(ItemDefinition, Position, NumberToSpawn, EFortPickupSourceTypeFlag::Other, EFortPickupSpawnSource::SupplyDrop, -1, TriggeringPawn, PickupClass);
return *Ret;
}
AFortPickup* AFortAthenaSupplyDrop::SpawnPickupHook(UObject* Context, FFrame& Stack, AFortPickup** Ret)
{
UFortWorldItemDefinition* ItemDefinition = nullptr; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int NumberToSpawn; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
AFortPawn* TriggeringPawn = nullptr; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FVector Position; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FVector Direction; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
Stack.StepCompiledIn(&ItemDefinition);
Stack.StepCompiledIn(&NumberToSpawn);
Stack.StepCompiledIn(&TriggeringPawn);
Stack.StepCompiledIn(&Position);
Stack.StepCompiledIn(&Direction);
SpawnPickupOriginal(Context, Stack, Ret);
if (!ItemDefinition)
return nullptr;
*Ret = AFortPickup::SpawnPickup(ItemDefinition, Position, NumberToSpawn, EFortPickupSourceTypeFlag::Other, EFortPickupSpawnSource::SupplyDrop, -1, TriggeringPawn);
return *Ret;
}