Skip to content

Commit

Permalink
Never send pause flag on game end (closed ddnet#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Nov 26, 2023
1 parent 14902c7 commit 039ea30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/game/server/gamecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,10 +888,12 @@ void IGameController::Snap(int SnappingClient)
pGameData->m_GameStateEndTick = Server()->Tick() + m_GameStateTimer;
break;
case IGS_END_ROUND:
pGameData->m_GameStateFlags = pGameData->m_GameStateFlags & ~protocol7::GAMESTATEFLAG_PAUSED; // clear pause
pGameData->m_GameStateFlags |= protocol7::GAMESTATEFLAG_ROUNDOVER;
pGameData->m_GameStateEndTick = Server()->Tick() - m_GameStartTick - TIMER_END / 2 * Server()->TickSpeed() + m_GameStateTimer;
break;
case IGS_END_MATCH:
pGameData->m_GameStateFlags = pGameData->m_GameStateFlags & ~protocol7::GAMESTATEFLAG_PAUSED; // clear pause
pGameData->m_GameStateFlags |= protocol7::GAMESTATEFLAG_GAMEOVER;
pGameData->m_GameStateEndTick = Server()->Tick() - m_GameStartTick - TIMER_END * Server()->TickSpeed() + m_GameStateTimer;
break;
Expand Down

0 comments on commit 039ea30

Please sign in to comment.