mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 08:02:23 -07:00
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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user