Merge branch 'master' into PreventNewWarnings
This commit is contained in:
commit
b29ae54d91
@ -52,6 +52,9 @@ if(MSVC OR MSVC_IDE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(BUILD_TOOLS OFF CACHE BOOL "")
|
||||||
|
set(SELF_TEST OFF CACHE BOOL "")
|
||||||
|
|
||||||
# This has to be done before any flags have been set up.
|
# This has to be done before any flags have been set up.
|
||||||
if(${BUILD_TOOLS})
|
if(${BUILD_TOOLS})
|
||||||
message("Building tools")
|
message("Building tools")
|
||||||
|
@ -1212,6 +1212,15 @@ void cPlayer::SetGameMode(eGameMode a_GameMode)
|
|||||||
SetCanFly(false);
|
SetCanFly(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsGameModeSpectator() && IsVisible())
|
||||||
|
{
|
||||||
|
SetVisible(false);
|
||||||
|
}
|
||||||
|
else if (!IsVisible())
|
||||||
|
{
|
||||||
|
SetVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
m_World->BroadcastPlayerListUpdateGameMode(*this);
|
m_World->BroadcastPlayerListUpdateGameMode(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ bool cOverridesSettingsRepository::DeleteValue(const AString & a_KeyName, const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return m_Overrides->DeleteValue(a_KeyName, a_ValueName);
|
return m_Main->DeleteValue(a_KeyName, a_ValueName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
54
src/main.cpp
54
src/main.cpp
@ -374,6 +374,14 @@ std::unique_ptr<cMemorySettingsRepository> parseArguments(int argc, char **argv)
|
|||||||
|
|
||||||
TCLAP::MultiArg<int> portsArg("p", "port", "The port number the server should listen to", false, "port", cmd);
|
TCLAP::MultiArg<int> portsArg("p", "port", "The port number the server should listen to", false, "port", cmd);
|
||||||
|
|
||||||
|
TCLAP::SwitchArg commLogArg("", "log-comm", "Log server client communications to file", cmd);
|
||||||
|
|
||||||
|
TCLAP::SwitchArg commLogInArg("", "log-comm-in", "Log inbound server client communications to file", cmd);
|
||||||
|
|
||||||
|
TCLAP::SwitchArg commLogOutArg("", "log-comm-out", "Log outbound server client communications to file", cmd);
|
||||||
|
|
||||||
|
TCLAP::SwitchArg noBufArg("", "no-output-buffering", "Disable output buffering", cmd);
|
||||||
|
|
||||||
cmd.parse(argc, argv);
|
cmd.parse(argc, argv);
|
||||||
|
|
||||||
auto repo = cpp14::make_unique<cMemorySettingsRepository>();
|
auto repo = cpp14::make_unique<cMemorySettingsRepository>();
|
||||||
@ -396,6 +404,22 @@ std::unique_ptr<cMemorySettingsRepository> parseArguments(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (commLogArg.getValue())
|
||||||
|
{
|
||||||
|
g_ShouldLogCommIn = true;
|
||||||
|
g_ShouldLogCommOut = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_ShouldLogCommIn = commLogInArg.getValue();
|
||||||
|
g_ShouldLogCommOut = commLogOutArg.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (noBufArg.getValue())
|
||||||
|
{
|
||||||
|
setvbuf(stdout, nullptr, _IONBF, 0);
|
||||||
|
}
|
||||||
|
|
||||||
repo->SetReadOnly();
|
repo->SetReadOnly();
|
||||||
|
|
||||||
return repo;
|
return repo;
|
||||||
@ -473,35 +497,7 @@ int main(int argc, char **argv)
|
|||||||
for (int i = 0; i < argc; i++)
|
for (int i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
AString Arg(argv[i]);
|
AString Arg(argv[i]);
|
||||||
if (
|
if (NoCaseCompare(Arg, "/service") == 0)
|
||||||
(NoCaseCompare(Arg, "/commlog") == 0) ||
|
|
||||||
(NoCaseCompare(Arg, "/logcomm") == 0)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
g_ShouldLogCommIn = true;
|
|
||||||
g_ShouldLogCommOut = true;
|
|
||||||
}
|
|
||||||
else if (
|
|
||||||
(NoCaseCompare(Arg, "/commlogin") == 0) ||
|
|
||||||
(NoCaseCompare(Arg, "/comminlog") == 0) ||
|
|
||||||
(NoCaseCompare(Arg, "/logcommin") == 0)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
g_ShouldLogCommIn = true;
|
|
||||||
}
|
|
||||||
else if (
|
|
||||||
(NoCaseCompare(Arg, "/commlogout") == 0) ||
|
|
||||||
(NoCaseCompare(Arg, "/commoutlog") == 0) ||
|
|
||||||
(NoCaseCompare(Arg, "/logcommout") == 0)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
g_ShouldLogCommOut = true;
|
|
||||||
}
|
|
||||||
else if (NoCaseCompare(Arg, "nooutbuf") == 0)
|
|
||||||
{
|
|
||||||
setvbuf(stdout, nullptr, _IONBF, 0);
|
|
||||||
}
|
|
||||||
else if (NoCaseCompare(Arg, "/service") == 0)
|
|
||||||
{
|
{
|
||||||
cRoot::m_RunAsService = true;
|
cRoot::m_RunAsService = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user