@@ -40,33 +40,53 @@ void CGameControllerDDRace::KO_Start()
4040 bool finished = (GameServer ()->ko_player_count <= 1 );
4141
4242 if (GameServer ()->ko_round >= g_Config.m_SvKoBo3 )
43+ {
44+ GameServer ()->SendChat (-1 , TEAM_ALL, " Ran out of rounds" );
4345 finished = true ;
46+ }
4447
4548 if (finished)
4649 {
50+ int highestId = -1 ;
51+ int highestWins = -1 ;
4752 for (int i = 0 ; i < MAX_CLIENTS; i++)
4853 {
4954 if (!GameServer ()->PlayerExists (i))
5055 continue ;
5156
5257 if (GameServer ()->m_apPlayers [i]->GetTeam () == TEAM_SPECTATORS)
5358 continue ;
59+
60+ if (highestWins < GameServer ()->m_apPlayers [i]->m_ko_wins )
61+ {
62+ highestWins = GameServer ()->m_apPlayers [i]->m_ko_wins ;
63+ highestId = i;
64+ }
5465
5566 char aBuf[256 ];
56- if (GameServer ()->m_apPlayers [i]->m_player_eliminated )
67+ if (GameServer ()->m_apPlayers [i]->m_player_eliminated && !g_Config. m_SvKoBo3 )
5768 {
5869 str_format (aBuf, sizeof (aBuf), " you survived until round %i!" , GameServer ()->m_apPlayers [i]->m_ko_round );
5970 GameServer ()->SendChatTarget (i, aBuf);
6071 continue ;
6172 }
6273
6374 str_format (aBuf, sizeof (aBuf), " %s wins!" , Server ()->ClientName (i));
64- GameServer ()->SendBroadcast (aBuf, -1 , true );
6575
66- GameServer ()->m_apPlayers [i]->m_elimination = -2 ;
76+ if (!g_Config.m_SvKoBo3 )
77+ GameServer ()->SendBroadcast (aBuf, -1 , true );
6778 }
6879 m_Warmup = 10 * Server ()->TickSpeed ();
6980
81+ if (highestId != -1 && g_Config.m_SvKoBo3 )
82+ {
83+ char aBuf[256 ];
84+ str_format (aBuf, sizeof (aBuf), " %s wins with %i!" , Server ()->ClientName (highestId), highestWins);
85+ GameServer ()->SendBroadcast (aBuf, -1 , true );
86+ GameServer ()->SendChat (-1 , TEAM_ALL, aBuf);
87+ GameServer ()->m_apPlayers [highestId]->m_elimination = -2 ;
88+ }
89+
7090 if (!g_Config.m_SvKoBo3 )
7191 SaveCOTD ();
7292 GameServer ()->ko_game = false ;
0 commit comments