ValvePython / dota2

🐸 Python package for interacting with Dota 2 Game Coordinator
http://dota2.readthedocs.io
198 stars 32 forks source link

Match doesn't end if everyone left #87

Open pavel-vorobyev opened 2 years ago

pavel-vorobyev commented 2 years ago

I'm running a game in a lobby with a 1v1SoloMid game mode and passing league_id to save the match and get the result of the game. If all 2 players left the match it's doesn't end, the creeps keep playing until the first tower is gone. But if I don't pass the league, it works well. Once some of them leave, the game will be over. But I need a league_id. How can I fix this? May be there are same parameters for this in the LobbyOptions?

pavel-vorobyev commented 2 years ago

BTW I can detect if someone has left the game. Maybe it's possible to finish the game manually?

Philaeux commented 1 year ago

If you provide a league_id, you turn the game into a competitive league lobby (tracked by dota tv and linked to a ticket). Such games keep on going even if people leave. To be totally right, the game coordinator considers that your bot is in the game as a spectator (so there is still someone). And as a spectator I don't think you can do anything, so I don't think there is any message you could send. You should enforce some rule in your competition for people to type "gg" instead of hard leaving your lobbies. Isn't 1v1 ending when tower is destroyed or 2 kills?