mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 00:01:37 -07:00
CogEngine: Fix crash
This commit is contained in:
@@ -226,9 +226,10 @@ void ACogEngineReplicator::Server_DeleteActor_Implementation(AActor* Actor)
|
||||
void ACogEngineReplicator::Server_ApplyCheat_Implementation(const AActor* CheatInstigator, const TArray<AActor*>& Targets, const FCogEngineCheat& Cheat) const
|
||||
{
|
||||
if (Cheat.Execution == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
{ return; }
|
||||
|
||||
if (GetWorld() == nullptr)
|
||||
{ return; }
|
||||
|
||||
Cheat.Execution->Execute(GetWorld(), CheatInstigator, Targets);
|
||||
}
|
||||
@@ -236,6 +237,9 @@ void ACogEngineReplicator::Server_ApplyCheat_Implementation(const AActor* CheatI
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
ECogEngineCheat_ActiveState ACogEngineReplicator::IsCheatActiveOnTargets(const TArray<AActor*>& Targets, const FCogEngineCheat& Cheat) const
|
||||
{
|
||||
if (GetWorld() == nullptr)
|
||||
{ return ECogEngineCheat_ActiveState::Inactive; }
|
||||
|
||||
if (Cheat.Execution == nullptr)
|
||||
{
|
||||
return ECogEngineCheat_ActiveState::Inactive;
|
||||
|
||||
@@ -190,6 +190,7 @@ void FCogEngineWindow_Cheats::RenderContent()
|
||||
if (Replicator == nullptr)
|
||||
{
|
||||
ImGui::TextDisabled("No Replicator");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenuBar())
|
||||
|
||||
Reference in New Issue
Block a user