From 7507d73158cf96b32db977c7db1a0ae90d4d28f8 Mon Sep 17 00:00:00 2001 From: RainbowwPhoenixx Date: Fri, 28 Jan 2022 11:40:05 +0100 Subject: [PATCH] fix: coop ghosts --- src/Features/Demo/NetworkGhostPlayer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Features/Demo/NetworkGhostPlayer.cpp b/src/Features/Demo/NetworkGhostPlayer.cpp index 1c5312c73..e122d66b4 100644 --- a/src/Features/Demo/NetworkGhostPlayer.cpp +++ b/src/Features/Demo/NetworkGhostPlayer.cpp @@ -464,7 +464,7 @@ void NetworkManager::RunNetwork() { // It's been one update rate interval - send our data again // if we need to - if (engine->isRunning() && !engine->IsGamePaused()) { + if ((engine->isRunning() || engine->IsOrange()) && !engine->IsGamePaused()) { this->SendPlayerData(); } @@ -1077,13 +1077,14 @@ void NetworkManager::UpdateSyncUi() { } ON_EVENT(RENDER) { - if (networkManager.isConnected && engine->isRunning()) { + if (networkManager.isConnected && (engine->isRunning() || engine->IsOrange())) { + // Is this executed on orange?? (is the engine considered running?) networkManager.UpdateGhostsPosition(); } } ON_EVENT(PRE_TICK) { - if (networkManager.isConnected && engine->isRunning()) { + if (networkManager.isConnected && (engine->isRunning() || engine->IsOrange())) { if (networkManager.isCountdownReady) { networkManager.UpdateCountdown(); }