mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 00:01:37 -07:00
Cheat command fallback to PIE 1 actor selection
This commit is contained in:
@@ -15,8 +15,16 @@ 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;
|
||||
return Context;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -72,7 +72,7 @@ struct COGDEBUG_API FCogDebug
|
||||
static void GetDebugDrawSweepSettings(FCogDebugDrawSweepParams& Params);
|
||||
|
||||
static FCogDebugContext& Get(int32 InPieId);
|
||||
|
||||
|
||||
static FCogDebugContext& Get();
|
||||
|
||||
static int32 GetPieSessionId();
|
||||
|
||||
@@ -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