Cheat command fallback to PIE 1 actor selection
This commit is contained in:
1 parent
13caff8dbe
commit
539a4ba9e8
2 files changed
+10
-1
No files matched your search
@@ -15,6 +15,14 @@ FCogDebugSettings FCogDebug::Settings = FCogDebugSettings();
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
FCogDebugContext& FCogDebug::Get(const int32 InPieId)
|
||||
{
|
||||
if (InPieId == INDEX_NONE)
|
||||
{
|
||||
if (FCogDebugContext* Context = DebugContexts.Find(1))
|
||||
{
|
||||
return *Context;
|
||||
}
|
||||
}
|
||||
|
||||
FCogDebugContext& Context = DebugContexts.FindOrAdd(InPieId);
|
||||
return Context;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,8 @@ void FCogEngineWindow_Cheats::Initialize()
|
||||
const bool ApplyToAllies = InArgs.Contains("-Allies");
|
||||
const bool ApplyToControlled = InArgs.Contains("-Controlled");
|
||||
|
||||
RequestCheat(*Replicator, GetLocalPlayerPawn(), GetSelection(), *Cheat, ApplyToEnemies, ApplyToAllies, ApplyToControlled);
|
||||
AActor* Selection = GetSelection();
|
||||
RequestCheat(*Replicator, GetLocalPlayerPawn(), Selection, *Cheat, ApplyToEnemies, ApplyToAllies, ApplyToControlled);
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
Reference in new issue
Block a user