1
0
forked from 0ad/0ad

Checks for game end after toggling diplomacy. Also adds a comment for clarification to the lobby bot. Refs #2402.

This was SVN commit r14652.
This commit is contained in:
scythetwirler 2014-01-24 00:38:08 +00:00
parent 53900c082b
commit f94a1aeac0
2 changed files with 2 additions and 0 deletions

View File

@ -610,6 +610,7 @@ Player.prototype.OnPlayerDefeated = function(msg)
Player.prototype.OnDiplomacyChanged = function()
{
this.UpdateSharedLos();
Engine.QueryInterface(SYSTEM_ENTITY, IID_EndGameManager).CheckConquestCriticalEntities();
};
Player.prototype.SetCheatsEnabled = function(flag)

View File

@ -120,6 +120,7 @@ class LeaderboardList():
if state == 'won'}))
# We only support 1v1s right now. TODO: Support team games.
if len(winning_jids) * 2 > len(dict.keys(gamereport['playerStates'])):
# More than half the people have won. This is not a balanced team game or duel.
return False
if len(dict.keys(gamereport['playerStates'])) != 2:
return False