CogPackage: fix Gameplay Cues not cooked

CogSample: Add area of effect
CogSample: Add "Easy" cheat
CogWindow: Fix some tooltips
CogEngine: Spawns now spawn the default controller
CogDebug: Early out on DebugDraw if WorldContextObject is null
This commit is contained in:
Arnaud Jamin
2023-10-20 15:47:57 -04:00
parent 812f4fa91f
commit ac90ba6ab6
31 changed files with 1277 additions and 347 deletions
@@ -316,3 +316,28 @@ bool UCogSampleFunctionLibrary_Gameplay::IsActorMatchingTags(const AActor* Actor
return Result;
}
//--------------------------------------------------------------------------------------------------------------------------
AActor* UCogSampleFunctionLibrary_Gameplay::GetActorInstigator(AActor* Actor)
{
if (Actor == nullptr)
{
return nullptr;
}
AActor* Instigator = Actor->GetInstigator();
if (Instigator != nullptr)
{
return Instigator;
}
//-------------------------------------------------
// The game state is the default Instigator
//-------------------------------------------------
UWorld* World = Actor->GetWorld();
if (World != nullptr)
{
return World->GetGameState();
}
return nullptr;
}