ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
641 stars 74 forks source link

[TF2] game_round_win crashes the server on KotH maps #4254

Open Doclic opened 2 years ago

Doclic commented 2 years ago

The game_round_win entity's RoundWin input crashes the game when playing on King of the Hill maps. Apparently, this is due to an infinite loop in CTeamControlPointMaster::CalcNumRoundsRemaining. This seems unlikely after doing more research, check my second comment.

Doclic commented 1 year ago

After doing a bit more research, I found a way to go around the crash: Setting the gamerules's m_bPlayingKoth variable to false prevents the game from crashing. This makes we wonder if the error is actually from CTeamControlPointMaster::CalcNumRoundsRemaining as neither this function or CTFGameRules::SendWinPanelInfo (the function that calls CTeamControlPointMaster::CalcNumRoundsRemaining) have any mention of m_bPlayingKoth or CTFGameRules::IsInKothMode. Crash reports also indicate that CTFGameRules::SetWinningTeam is the culprit.