Server freezes right before winning a stage

pogviuemper

L1: Registered
Apr 25, 2020
34
16
I usually playtest my maps with my friend and like 20 bots just for error checking and just for fun.

But after I added stage 3 to my Radio and played it as always, server consistently freezed exactly right before one of teams won stage 2; no errors in the console/log file.

It seems that the server freeze happens completely at random, as if it was chosen by the server from the start: I rarely get a freeze by playing solo on localhost, I sometimes get a freeze on a dedicated server only with me and my friend, and I frequently get a freeze when playing with ~20 bots on a dedicated server.

The map has already been tested here once with 3rd stage, and no freezes ever happened.

Logic on the map should be correct; at least it gives no errors and it worked perfectly before addition of stage 3. Though, Valve maybe never considered to there ever be a multistage KotH, so game code may be just broken for that kind of map.

Really need help on this, as it could create a crash on TF2maps servers. Couldn't find anything useful by googling it.
 

pogviuemper

L1: Registered
Apr 25, 2020
34
16
For anyone who gets the same issue, the freeze happens because "team_control_point_entity" wasn't designed for gamemodes where both teams win by objective, so the game just dies when one team wins first stage, and the other team wins the second stage.
I got around this problem by doing pretty much or exactly like Mikroscopic did in his prefab: 1] Make the point of stage 1 be captured together with the point of stage 2; 2] Add a second, invisible on HUD and invisible to player capture point on stage 2 (don't forget it on the control_point_master), and make it be capped together with the original one with some delay, like 0.1 seconds. And unlike Mikroscopic's prefab, this gets all 3 stages to work whether one team wins both first two stages or not, if it wasn't intentional there.

And that should be it. This problem occurs on any 3-stage gamemodes where both teams win by objective only (like symmetrical CP), and the process for the fix is probably the same; though, I never tested that.