mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-02 05:24:20 +00:00
@@ -183,10 +183,10 @@ using ServerRuntime::WorldBootstrapResult;
|
||||
|
||||
static bool ParseIntArg(const char *value, int *outValue)
|
||||
{
|
||||
if (value == nullptr || *value == 0)
|
||||
if (value == NULL || *value == 0)
|
||||
return false;
|
||||
|
||||
char *end = nullptr;
|
||||
char *end = NULL;
|
||||
long parsed = strtol(value, &end, 10);
|
||||
if (end == value || *end != 0)
|
||||
return false;
|
||||
@@ -197,10 +197,10 @@ static bool ParseIntArg(const char *value, int *outValue)
|
||||
|
||||
static bool ParseInt64Arg(const char *value, __int64 *outValue)
|
||||
{
|
||||
if (value == nullptr || *value == 0)
|
||||
if (value == NULL || *value == 0)
|
||||
return false;
|
||||
|
||||
char *end = nullptr;
|
||||
char *end = NULL;
|
||||
__int64 parsed = _strtoi64(value, &end, 10);
|
||||
if (end == value || *end != 0)
|
||||
return false;
|
||||
@@ -277,9 +277,9 @@ static bool ParseCommandLine(int argc, char **argv, DedicatedServerConfig *confi
|
||||
static void SetExeWorkingDirectory()
|
||||
{
|
||||
char exePath[MAX_PATH] = {};
|
||||
GetModuleFileNameA(nullptr, exePath, MAX_PATH);
|
||||
GetModuleFileNameA(NULL, exePath, MAX_PATH);
|
||||
char *slash = strrchr(exePath, '\\');
|
||||
if (slash != nullptr)
|
||||
if (slash != NULL)
|
||||
{
|
||||
*(slash + 1) = 0;
|
||||
SetCurrentDirectoryA(exePath);
|
||||
@@ -288,7 +288,7 @@ static void SetExeWorkingDirectory()
|
||||
|
||||
static void ApplyServerPropertiesToDedicatedConfig(const ServerPropertiesConfig &serverProperties, DedicatedServerConfig *config)
|
||||
{
|
||||
if (config == nullptr)
|
||||
if (config == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -420,7 +420,7 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
LogStartupStep("registering hidden window class");
|
||||
HINSTANCE hInstance = GetModuleHandle(nullptr);
|
||||
HINSTANCE hInstance = GetModuleHandle(NULL);
|
||||
MyRegisterClass(hInstance);
|
||||
|
||||
LogStartupStep("creating hidden window");
|
||||
@@ -490,7 +490,7 @@ int main(int argc, char **argv)
|
||||
LogStartupStep("creating Minecraft singleton");
|
||||
Minecraft::main();
|
||||
Minecraft *minecraft = Minecraft::GetInstance();
|
||||
if (minecraft == nullptr)
|
||||
if (minecraft == NULL)
|
||||
{
|
||||
LogError("startup", "Minecraft initialization failed.");
|
||||
CleanupDevice();
|
||||
@@ -685,11 +685,11 @@ int main(int argc, char **argv)
|
||||
|
||||
LogInfof("shutdown", "Dedicated server stopped");
|
||||
MinecraftServer *server = MinecraftServer::getInstance();
|
||||
if (server != nullptr)
|
||||
if (server != NULL)
|
||||
{
|
||||
server->setSaveOnExit(true);
|
||||
}
|
||||
if (server != nullptr)
|
||||
if (server != NULL)
|
||||
{
|
||||
LogWorldIO("requesting save before shutdown");
|
||||
LogWorldIO("using saveOnExit for shutdown");
|
||||
@@ -699,7 +699,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (g_NetworkManager.ServerStoppedValid())
|
||||
{
|
||||
C4JThread waitThread(&WaitForServerStoppedThreadProc, nullptr, "WaitServerStopped");
|
||||
C4JThread waitThread(&WaitForServerStoppedThreadProc, NULL, "WaitServerStopped");
|
||||
waitThread.Run();
|
||||
waitThread.WaitForCompletion(INFINITE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user