change how abilities work ("more" proper), readded vehicle spawning to s8-s12, fixed respawning on >s4, added a count check to looting so it can't drop 0 count, added zipline jumping, guarantee pawn spawn, clear inventory on aircraft
This commit is contained in:
Milxnor
2023-03-31 18:06:36 -04:00
parent 4d8b3a7ad1
commit d53626a850
22 changed files with 269 additions and 117 deletions

View File

@@ -128,11 +128,12 @@ static inline AActor* SpawnVehicleFromSpawner(AActor* VehicleSpawner)
SpawnTransform.Scale3D = { 1, 1, 1 };
static auto VehicleClassOffset = VehicleSpawner->GetOffset("VehicleClass", false);
static auto BGAClass = FindObject<UClass>("/Script/Engine.BlueprintGeneratedClass");
if (VehicleClassOffset != -1) // 10.40 and below?
{
auto& SoftVehicleClass = VehicleSpawner->Get<TSoftObjectPtr<UClass>>(VehicleClassOffset);
auto StrongVehicleClass = SoftVehicleClass.Get();
auto StrongVehicleClass = SoftVehicleClass.Get(BGAClass, true);
if (!StrongVehicleClass)
{
@@ -150,7 +151,7 @@ static inline AActor* SpawnVehicleFromSpawner(AActor* VehicleSpawner)
return nullptr;
auto& SoftFortVehicleItemDef = VehicleSpawner->Get<TSoftObjectPtr<UFortItemDefinition>>(FortVehicleItemDefOffset);
auto StrongFortVehicleItemDef = SoftFortVehicleItemDef.Get();
auto StrongFortVehicleItemDef = SoftFortVehicleItemDef.Get(nullptr, true);
if (!StrongFortVehicleItemDef)
{
@@ -161,7 +162,7 @@ static inline AActor* SpawnVehicleFromSpawner(AActor* VehicleSpawner)
static auto VehicleActorClassOffset = StrongFortVehicleItemDef->GetOffset("VehicleActorClass");
auto& SoftVehicleActorClass = StrongFortVehicleItemDef->Get<TSoftObjectPtr<UClass>>(VehicleActorClassOffset);
auto StrongVehicleActorClass = SoftVehicleActorClass.Get();
auto StrongVehicleActorClass = SoftVehicleActorClass.Get(BGAClass, true);
if (!StrongVehicleActorClass)
{