2016-01-07 08:17:16 -05:00
|
|
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
2014-04-23 19:29:53 -04:00
|
|
|
|
|
|
|
|
#include "FunctionalTestingPrivatePCH.h"
|
|
|
|
|
#include "ObjectEditorUtils.h"
|
2014-05-29 17:06:50 -04:00
|
|
|
#include "Blueprint/AIBlueprintHelperLibrary.h"
|
|
|
|
|
#include "BehaviorTree/BehaviorTree.h"
|
|
|
|
|
#include "AIController.h"
|
2014-04-23 19:29:53 -04:00
|
|
|
|
2014-10-14 10:29:11 -04:00
|
|
|
AFunctionalAITest::AFunctionalAITest( const FObjectInitializer& ObjectInitializer )
|
|
|
|
|
: Super(ObjectInitializer)
|
2014-04-23 19:29:53 -04:00
|
|
|
, CurrentSpawnSetIndex(INDEX_NONE)
|
2014-06-17 08:31:02 -04:00
|
|
|
, bSingleSetRun(false)
|
2014-04-23 19:29:53 -04:00
|
|
|
{
|
2014-11-03 15:47:28 -05:00
|
|
|
SpawnLocationRandomizationRange = 0.f;
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool AFunctionalAITest::IsOneOfSpawnedPawns(AActor* Actor)
|
|
|
|
|
{
|
|
|
|
|
APawn* Pawn = Cast<APawn>(Actor);
|
|
|
|
|
return Pawn != NULL && SpawnedPawns.Contains(Pawn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AFunctionalAITest::BeginPlay()
|
|
|
|
|
{
|
|
|
|
|
// do a post-load step and remove all disabled spawn sets
|
|
|
|
|
for(int32 Index = SpawnSets.Num()-1; Index >= 0; --Index)
|
|
|
|
|
{
|
|
|
|
|
FAITestSpawnSet& SpawnSet = SpawnSets[Index];
|
|
|
|
|
if (SpawnSet.bEnabled == false)
|
|
|
|
|
{
|
|
|
|
|
UE_LOG(LogFunctionalTest, Log, TEXT("Removing disabled spawn set \'%s\'."), *SpawnSets[Index].Name.ToString());
|
|
|
|
|
SpawnSets.RemoveAt(Index, 1, false);
|
|
|
|
|
}
|
2014-06-06 06:27:44 -04:00
|
|
|
else
|
2014-04-23 19:29:53 -04:00
|
|
|
{
|
2014-06-06 06:27:44 -04:00
|
|
|
// update all spawn info that doesn't have spawn location set, and set spawn set name
|
2014-04-23 19:29:53 -04:00
|
|
|
for (int32 SpawnIndex = 0; SpawnIndex < SpawnSet.SpawnInfoContainer.Num(); ++SpawnIndex)
|
|
|
|
|
{
|
|
|
|
|
FAITestSpawnInfo& SpawnInfo = SpawnSet.SpawnInfoContainer[SpawnIndex];
|
2014-06-06 06:27:44 -04:00
|
|
|
SpawnInfo.SpawnSetName = SpawnSet.Name;
|
2014-04-23 19:29:53 -04:00
|
|
|
if (SpawnInfo.SpawnLocation == NULL)
|
|
|
|
|
{
|
2014-09-29 21:43:13 -04:00
|
|
|
SpawnInfo.SpawnLocation = SpawnSet.FallbackSpawnLocation ? SpawnSet.FallbackSpawnLocation : this;
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
SpawnSets.Shrink();
|
|
|
|
|
|
|
|
|
|
Super::BeginPlay();
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-17 08:31:02 -04:00
|
|
|
bool AFunctionalAITest::StartTest(const TArray<FString>& Params)
|
2014-04-23 19:29:53 -04:00
|
|
|
{
|
|
|
|
|
KillOffSpawnedPawns();
|
2014-06-06 06:27:44 -04:00
|
|
|
ClearPendingDelayedSpawns();
|
2014-04-23 19:29:53 -04:00
|
|
|
|
2014-11-11 10:35:51 -05:00
|
|
|
RandomNumbersStream.Reset();
|
|
|
|
|
|
2014-06-17 08:31:02 -04:00
|
|
|
bSingleSetRun = Params.Num() > 0;
|
|
|
|
|
if (bSingleSetRun)
|
|
|
|
|
{
|
|
|
|
|
TTypeFromString<int32>::FromString(CurrentSpawnSetIndex, *Params[0]);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
++CurrentSpawnSetIndex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CurrentSpawnSetIndex < SpawnSets.Num())
|
2014-04-23 19:29:53 -04:00
|
|
|
{
|
|
|
|
|
UWorld* World = GetWorld();
|
|
|
|
|
check(World);
|
|
|
|
|
const FAITestSpawnSet& SpawnSet = SpawnSets[CurrentSpawnSetIndex];
|
|
|
|
|
|
|
|
|
|
bool bSuccessfullySpawnedAll = true;
|
|
|
|
|
|
|
|
|
|
// NOTE: even if some pawns fail to spawn we don't stop spawning to find all spawns that will fails.
|
|
|
|
|
// all spawned pawns get filled off in case of failure.
|
|
|
|
|
CurrentSpawnSetName = SpawnSet.Name.ToString();
|
|
|
|
|
|
|
|
|
|
for (int32 SpawnIndex = 0; SpawnIndex < SpawnSet.SpawnInfoContainer.Num(); ++SpawnIndex)
|
|
|
|
|
{
|
|
|
|
|
const FAITestSpawnInfo& SpawnInfo = SpawnSet.SpawnInfoContainer[SpawnIndex];
|
|
|
|
|
if (SpawnInfo.IsValid())
|
|
|
|
|
{
|
2014-06-06 06:27:44 -04:00
|
|
|
if (SpawnInfo.SpawnDelay == 0.0)
|
2014-04-23 19:29:53 -04:00
|
|
|
{
|
2014-06-06 06:27:44 -04:00
|
|
|
for (int32 SpawnedCount = 0; SpawnedCount < SpawnInfo.NumberToSpawn; ++SpawnedCount)
|
|
|
|
|
{
|
|
|
|
|
bSuccessfullySpawnedAll &= SpawnInfo.Spawn(this);
|
|
|
|
|
}
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-06-06 06:27:44 -04:00
|
|
|
bSuccessfullySpawnedAll &= SpawnInfo.Spawn(this);
|
|
|
|
|
if (SpawnInfo.NumberToSpawn > 1)
|
|
|
|
|
{
|
|
|
|
|
PendingDelayedSpawns.Add(SpawnInfo);
|
|
|
|
|
}
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
const FString SpawnFailureMessage = FString::Printf(TEXT("Spawn set \'%s\' contains invalid entry at index %d")
|
2014-04-23 19:29:53 -04:00
|
|
|
, *SpawnSet.Name.ToString()
|
|
|
|
|
, SpawnIndex);
|
|
|
|
|
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
UE_LOG(LogFunctionalTest, Warning, TEXT("%s"), *SpawnFailureMessage);
|
2014-04-23 19:29:53 -04:00
|
|
|
|
|
|
|
|
bSuccessfullySpawnedAll = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bSuccessfullySpawnedAll == false)
|
|
|
|
|
{
|
|
|
|
|
KillOffSpawnedPawns();
|
2014-06-06 06:27:44 -04:00
|
|
|
}
|
2014-04-23 19:29:53 -04:00
|
|
|
else
|
|
|
|
|
{
|
2014-06-06 06:27:44 -04:00
|
|
|
if (PendingDelayedSpawns.Num() > 0)
|
|
|
|
|
{
|
|
|
|
|
SetActorTickEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-23 19:29:53 -04:00
|
|
|
return Super::StartTest();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool AFunctionalAITest::WantsToRunAgain() const
|
|
|
|
|
{
|
2014-06-17 08:31:02 -04:00
|
|
|
return bSingleSetRun == false && CurrentSpawnSetIndex + 1 < SpawnSets.Num();
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
|
2015-03-11 11:02:39 -04:00
|
|
|
void AFunctionalAITest::GatherRelevantActors(TArray<AActor*>& OutActors) const
|
|
|
|
|
{
|
|
|
|
|
Super::GatherRelevantActors(OutActors);
|
|
|
|
|
|
|
|
|
|
for (auto SpawnSet : SpawnSets)
|
|
|
|
|
{
|
|
|
|
|
if (SpawnSet.FallbackSpawnLocation)
|
|
|
|
|
{
|
|
|
|
|
OutActors.AddUnique(SpawnSet.FallbackSpawnLocation);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (auto SpawnInfo : SpawnSet.SpawnInfoContainer)
|
|
|
|
|
{
|
|
|
|
|
if (SpawnInfo.SpawnLocation)
|
|
|
|
|
{
|
|
|
|
|
OutActors.AddUnique(SpawnInfo.SpawnLocation);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (auto Pawn : SpawnedPawns)
|
|
|
|
|
{
|
|
|
|
|
if (Pawn)
|
|
|
|
|
{
|
|
|
|
|
OutActors.Add(Pawn);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-04-23 19:29:53 -04:00
|
|
|
|
|
|
|
|
void AFunctionalAITest::CleanUp()
|
|
|
|
|
{
|
|
|
|
|
Super::CleanUp();
|
|
|
|
|
CurrentSpawnSetIndex = INDEX_NONE;
|
|
|
|
|
|
|
|
|
|
KillOffSpawnedPawns();
|
2014-06-06 06:27:44 -04:00
|
|
|
ClearPendingDelayedSpawns();
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString AFunctionalAITest::GetAdditionalTestFinishedMessage(EFunctionalTestResult::Type TestResult) const
|
|
|
|
|
{
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
FString ResultStr;
|
2014-04-23 19:29:53 -04:00
|
|
|
|
|
|
|
|
if (SpawnedPawns.Num() > 0)
|
|
|
|
|
{
|
|
|
|
|
if (CurrentSpawnSetName.Len() > 0 && CurrentSpawnSetName != TEXT("None"))
|
|
|
|
|
{
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
ResultStr = FString::Printf(TEXT("spawn set \'%s\', pawns: "), *CurrentSpawnSetName);
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
ResultStr = TEXT("pawns: ");
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int32 PawnIndex = 0; PawnIndex < SpawnedPawns.Num(); ++PawnIndex)
|
|
|
|
|
{
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
ResultStr += FString::Printf(TEXT("%s, "), *GetNameSafe(SpawnedPawns[PawnIndex]));
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2944217
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2899855 on 2016/03/08 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2899785
Change 2926689 on 2016/03/29 by Jeff.Farris
AAIController::SetFocus() will now implicitly clear any location focus at the same priority.
UE-27975
#rb john.abercrombie
Change 2926690 on 2016/03/29 by Jeff.Farris
Using wildcard operator with the "KismetEvent" or "ke" console commands will now only trigger the event on objects in the world in which it was triggered. Prevents badness with running events on things like CDOs and editor actors. (UE-23106)
Change 2926691 on 2016/03/29 by mason.seay
Content for testing collision on scaled components
Change 2926692 on 2016/03/29 by Jeff.Farris
- FixupDeltaSeconds now considers time dilation when clamping.
- Acceptable range for time dilation values is now a config parameter on WorldSettings
- Acceptable range for undilated frame times is now a config parameter on WorldSettings
(UE-27815)
#rb marc.audy
Change 2926711 on 2016/03/29 by Ori.Cohen
Fix constraint rendering when scaling a cosntraint actor
#JIRA UE-28691, UE-28700
#rb Lina.Halper
Change 2926745 on 2016/03/29 by Lukasz.Furman
navigation filters can now be instantiated per querier - usually AI agent
required for FORT-21372
Change 2926789 on 2016/03/29 by Ori.Cohen
Downgrade check to ensure for 2d physics during a hard shutdown
#rb Michael.Noland
Change 2926859 on 2016/03/29 by Ori.Cohen
Fix red herring warnings of not locking physx scenes during hard shutdown.
#JIRA UE-28747
#rb Michael.Noland
Change 2927444 on 2016/03/30 by Thomas.Sarkanen
Fixed Blueprint compiler errors when resetting timer handles
Added basic support for 64-bit int/uint terms to Blueprint. This allows the use of opaque 64-bit integer types inside of BlueprintType structs, it in no way means that 64-bit ints are fully supported in Blueprint.
Corrected a left-over formatting oversight when converting a FTimerHandle to a string.
Added new by-ref "Clear and Invalidate Timer by Handle" function to Blueprint system library & deprecated old version.
#rb Maciej.Mroz (and a few others!)
#jira UE-28833 - Unresolved compiler error for B_Pickups blueprint in Fortnite
Change 2927520 on 2016/03/30 by Jurre.deBaare
Should not allow skeletal mesh components mobility to be set to static, but detach instead
#fix Added CanHaveStaticMobility to SceneComponent class, and check this when trying to propogate Static mobility to parent component
#jira UE-26364
Change 2927533 on 2016/03/30 by Jurre.deBaare
Static Mesh Merge tool: when merging from multiple blueprints, fails to combine same materials
#fix Material index remapping was part of if-clause where it shouldn't be
#jira UE-23827
Static Mesh Merge tool, failed to combine physics data if using complex
#fix Required copying the SectionInfoMap from source static meshes
HLOD/MergeActor - Vertex Colours are not correctly propagated to negatively scaled meshes
#fix had to re-order function calls
#jira UE-28316
#rb James.Golding
Change 2927535 on 2016/03/30 by Ori.Cohen
Make sub-stepping run on game thread
#JIRA UE-24011
#rb Gil.Gribb
Change 2927537 on 2016/03/30 by Jurre.deBaare
Warning message when HLOD mesh > 65536 vertices
#jira UE-22365
#fix added messages when building proxy mesh
Change 2927691 on 2016/03/30 by Jeff.Farris
Fixed potential PlayerState leak (UE-22700)
Change 2927692 on 2016/03/30 by Lina.Halper
Allow it to select any name they want other than just restrict to what we have.
- I think it may not be the best solution but with current widget built, you can't even clear name, which is problem.
- Other solution is to add "Clear" as a name, and when that gets entered, we just clear it, but then the X button is odd and no purpose being there.
- I think we should just allow them to choose if they don't like it but with suggestions.
#rb: Ori.Cohen
#jira UE-27786
#code review: Benn.Gallagher
Change 2927853 on 2016/03/30 by Lina.Halper
[CL 2944273 by Marc Audy in Main branch]
2016-04-14 16:25:11 -04:00
|
|
|
return ResultStr;
|
2014-04-23 19:29:53 -04:00
|
|
|
}
|
|
|
|
|
|
2014-06-17 08:31:02 -04:00
|
|
|
FString AFunctionalAITest::GetReproString() const
|
|
|
|
|
{
|
|
|
|
|
return FString::Printf(TEXT("%s%s%d"), *(GetFName().ToString())
|
|
|
|
|
, FFunctionalTesting::ReproStringParamsSeparator
|
|
|
|
|
, CurrentSpawnSetIndex);
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-23 19:29:53 -04:00
|
|
|
void AFunctionalAITest::KillOffSpawnedPawns()
|
|
|
|
|
{
|
|
|
|
|
for (int32 PawnIndex = 0; PawnIndex < SpawnedPawns.Num(); ++PawnIndex)
|
|
|
|
|
{
|
|
|
|
|
if (SpawnedPawns[PawnIndex])
|
|
|
|
|
{
|
|
|
|
|
SpawnedPawns[PawnIndex]->Destroy();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SpawnedPawns.Reset();
|
|
|
|
|
}
|
2014-06-06 06:27:44 -04:00
|
|
|
|
|
|
|
|
void AFunctionalAITest::ClearPendingDelayedSpawns()
|
|
|
|
|
{
|
|
|
|
|
SetActorTickEnabled(false);
|
|
|
|
|
PendingDelayedSpawns.Reset();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AFunctionalAITest::Tick(float DeltaSeconds)
|
|
|
|
|
{
|
|
|
|
|
Super::Tick(DeltaSeconds);
|
|
|
|
|
|
|
|
|
|
for (auto& DelayedSpawn : PendingDelayedSpawns)
|
|
|
|
|
{
|
|
|
|
|
DelayedSpawn.Tick(DeltaSeconds, this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-17 08:31:02 -04:00
|
|
|
void AFunctionalAITest::AddSpawnedPawn(APawn& SpawnedPawn)
|
|
|
|
|
{
|
|
|
|
|
SpawnedPawns.Add(&SpawnedPawn);
|
|
|
|
|
OnAISpawned.Broadcast(Cast<AAIController>(SpawnedPawn.GetController()), &SpawnedPawn);
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-03 15:47:28 -05:00
|
|
|
FVector AFunctionalAITest::GetRandomizedLocation(const FVector& Location) const
|
|
|
|
|
{
|
2014-11-11 10:35:51 -05:00
|
|
|
return Location + FVector(RandomNumbersStream.FRandRange(-SpawnLocationRandomizationRange, SpawnLocationRandomizationRange), RandomNumbersStream.FRandRange(-SpawnLocationRandomizationRange, SpawnLocationRandomizationRange), 0);
|
2014-11-03 15:47:28 -05:00
|
|
|
}
|
|
|
|
|
|
2014-06-06 06:27:44 -04:00
|
|
|
//----------------------------------------------------------------------//
|
|
|
|
|
// FAITestSpawnInfo
|
|
|
|
|
//----------------------------------------------------------------------//
|
|
|
|
|
bool FAITestSpawnInfo::Spawn(AFunctionalAITest* AITest) const
|
|
|
|
|
{
|
|
|
|
|
check(AITest);
|
|
|
|
|
|
|
|
|
|
bool bSuccessfullySpawned = false;
|
|
|
|
|
|
|
|
|
|
APawn* SpawnedPawn = UAIBlueprintHelperLibrary::SpawnAIFromClass(AITest->GetWorld(), PawnClass, BehaviorTree
|
2014-11-03 15:47:28 -05:00
|
|
|
, AITest->GetRandomizedLocation(SpawnLocation->GetActorLocation())
|
2014-06-06 06:27:44 -04:00
|
|
|
, SpawnLocation->GetActorRotation()
|
|
|
|
|
, /*bNoCollisionFail=*/true);
|
|
|
|
|
|
|
|
|
|
if (SpawnedPawn == NULL)
|
|
|
|
|
{
|
|
|
|
|
FString FailureMessage = FString::Printf(TEXT("Failed to spawn \'%s\' pawn (\'%s\' set) ")
|
|
|
|
|
, *GetNameSafe(PawnClass)
|
|
|
|
|
, *SpawnSetName.ToString());
|
|
|
|
|
|
|
|
|
|
UE_LOG(LogFunctionalTest, Warning, TEXT("%s"), *FailureMessage);
|
|
|
|
|
}
|
|
|
|
|
else if (SpawnedPawn->GetController() == NULL)
|
|
|
|
|
{
|
|
|
|
|
FString FailureMessage = FString::Printf(TEXT("Spawned Pawn %s (\'%s\' set) has no controller ")
|
|
|
|
|
, *GetNameSafe(SpawnedPawn)
|
|
|
|
|
, *SpawnSetName.ToString());
|
|
|
|
|
|
|
|
|
|
UE_LOG(LogFunctionalTest, Warning, TEXT("%s"), *FailureMessage);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-11-15 20:50:16 -05:00
|
|
|
IGenericTeamAgentInterface* TeamAgent = Cast<IGenericTeamAgentInterface>(SpawnedPawn);
|
|
|
|
|
if (TeamAgent == nullptr)
|
|
|
|
|
{
|
|
|
|
|
TeamAgent = Cast<IGenericTeamAgentInterface>(SpawnedPawn->GetController());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (TeamAgent != nullptr)
|
|
|
|
|
{
|
|
|
|
|
TeamAgent->SetGenericTeamId(TeamID);
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-17 08:31:02 -04:00
|
|
|
AITest->AddSpawnedPawn(*SpawnedPawn);
|
2014-06-06 06:27:44 -04:00
|
|
|
bSuccessfullySpawned = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return bSuccessfullySpawned;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------//
|
|
|
|
|
//
|
|
|
|
|
//----------------------------------------------------------------------//
|
|
|
|
|
|
|
|
|
|
FPendingDelayedSpawn::FPendingDelayedSpawn(const FAITestSpawnInfo& Source)
|
|
|
|
|
: NumberToSpawnLeft(0), bFinished(false)
|
|
|
|
|
{
|
|
|
|
|
*((FAITestSpawnInfo*)this) = Source;
|
|
|
|
|
TimeToNextSpawn = Source.SpawnDelay;
|
|
|
|
|
NumberToSpawnLeft = Source.NumberToSpawn - 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FPendingDelayedSpawn::Tick(float TimeDelta, AFunctionalAITest* AITest)
|
|
|
|
|
{
|
|
|
|
|
if (bFinished)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TimeToNextSpawn -= TimeDelta;
|
|
|
|
|
|
|
|
|
|
if (TimeToNextSpawn <= 0)
|
|
|
|
|
{
|
|
|
|
|
Spawn(AITest);
|
|
|
|
|
TimeToNextSpawn = SpawnDelay;
|
|
|
|
|
bFinished = (--NumberToSpawnLeft <= 0);
|
|
|
|
|
}
|
|
|
|
|
}
|