Skip to content

Commit

Permalink
fix: coop ghosts
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowwPhoenixx committed Nov 13, 2023
1 parent 561806b commit 7507d73
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Features/Demo/NetworkGhostPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 7507d73

Please sign in to comment.