Using new GetBool value when checking if we're an editor-server. Clean up MPEditorSystemComponent for unused #includes, and null-checking when piping server logs
Signed-off-by: Gene Walters <genewalt@amazon.com>
This commit is contained in:
@@ -741,9 +741,8 @@ bool CSystem::Init(const SSystemInitParams& startupParams)
|
||||
bool suppressSystemOutput = true;
|
||||
if (const ICmdLineArg* isEditorServerArg = m_pCmdLine->FindArg(eCLAT_Pre, "editorsv_isDedicated"))
|
||||
{
|
||||
AZ::CVarFixedString lowercaseValue(isEditorServerArg->GetValue());
|
||||
AZStd::to_lower(lowercaseValue.begin(), lowercaseValue.end());
|
||||
if (lowercaseValue == "true")
|
||||
bool editorsv_isDedicated = false;
|
||||
if (isEditorServerArg->GetBoolValue(editorsv_isDedicated) && editorsv_isDedicated)
|
||||
{
|
||||
suppressSystemOutput = false;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "AzFramework/Process/ProcessCommunicator.h"
|
||||
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <Multiplayer/IMultiplayerTools.h>
|
||||
@@ -16,11 +15,8 @@
|
||||
#include <MultiplayerSystemComponent.h>
|
||||
#include <PythonEditorEventsBus.h>
|
||||
#include <Editor/MultiplayerEditorSystemComponent.h>
|
||||
#include <Source/AutoGen/Multiplayer.AutoPackets.h>
|
||||
|
||||
#include <AzCore/Component/ComponentApplicationBus.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
@@ -425,7 +421,17 @@ namespace Multiplayer
|
||||
|
||||
void MultiplayerEditorSystemComponent::OnTick(float, AZ::ScriptTimePoint)
|
||||
{
|
||||
m_serverProcessTracePrinter->Pump();
|
||||
if (m_serverProcessTracePrinter)
|
||||
{
|
||||
m_serverProcessTracePrinter->Pump();
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ::TickBus::Handler::BusDisconnect();
|
||||
AZ_Warning(
|
||||
"MultiplayerEditorSystemComponent", false,
|
||||
"The server process trace printer is NULL so we won't be able to pipe server logs to the editor. Please update the code to call AZ::TickBus::Handler::BusDisconnect whenever the editor-server is terminated.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user