Merge remote-tracking branch 'origin/main' into feat/minigames

This commit is contained in:
github-actions 2026-05-25 00:05:31 +00:00
commit be0114511b
5 changed files with 8 additions and 5 deletions

View file

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "../../Minecraft.World/net.minecraft.world.entity.item.h"
#include "../../Minecraft.World/net.minecraft.world.entity.player.h"
#include "../../Minecraft.World/net.minecraft.world.level.tile.entity.h"
@ -453,7 +453,7 @@ void CMinecraftApp::SetAction(int iPad, eXuiAction action, LPVOID param)
bool CMinecraftApp::IsAppPaused()
{
#if defined(_XBOX_ONE) || defined(__ORBIS__)
#if defined(_XBOX_ONE) || defined(__ORBIS__) || defined(_WINDOWS64)
bool paused = m_bIsAppPaused;
EnterCriticalSection(&m_saveNotificationCriticalSection);
if( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 )

View file

@ -1268,6 +1268,8 @@ void Minecraft::applyFrameMouseLook()
void Minecraft::run_middle()
{
pause = app.IsAppPaused();
static int64_t lastTime = 0;
static bool bFirstTimeIntoGame = true;
static bool bAutosaveTimerSet=false;

View file

@ -1848,7 +1848,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter)
lastTime = now;
// 4J Added ability to pause the server
if( !m_isServerPaused )
if( !m_isServerPaused && !app.IsAppPaused() )
{
bool didTick = false;
if (levels[0]->allPlayersAreSleeping())

View file

@ -266,7 +266,7 @@ private:
#endif
#endif
bool IsServerPaused() { return m_isServerPaused; }
private:
// 4J Added
@ -291,6 +291,7 @@ public:
const wstring& getSaveFolderName() const { return m_saveFolderName; }
void Suspend();
bool IsSuspending();
bool IsServerPaused() { return m_isServerPaused; }
// 4J Stu - A load of functions were all added in 1.0.1 in the ServerInterface, but I don't think we need any of them
};

View file

@ -183,7 +183,7 @@ void PlayerConnection::tick()
// Ensure server-side player tick runs even when no move packet was received this tick.
// Without this, environmental damage (drowning, fire, lava) is never applied to clients
// that don't send frequent move packets.
if (!didTick && player != nullptr)
if (!didTick && player != nullptr && !server->IsServerPaused() && !app.IsAppPaused())
{
player->doTick(false);
}