Ticket #4323: 4323_endless.2.patch

File 4323_endless.2.patch, 1003 bytes (added by Vladislav Belov, 7 years ago)

Nobody should win if it's the endless game

  • binaries/data/mods/public/simulation/components/EndGameManager.js

     
    2424    this.skipAlliedVictoryCheck = true;
    2525
    2626    this.lastManStandingMessage = undefined;
     27
     28    this.endlessGame = false;
    2729};
    2830
    2931EndGameManager.prototype.GetGameType = function()
     
    4648    this.gameType = newGameType;
    4749    this.gameTypeSettings = newSettings;
    4850    this.skipAlliedVictoryCheck = false;
     51    this.endlessGame = newGameType == "endless";
    4952
    5053    Engine.BroadcastMessage(MT_GameTypeChanged, {});
    5154};
     
    8386
    8487EndGameManager.prototype.AlliedVictoryCheck = function()
    8588{
    86     if (this.skipAlliedVictoryCheck)
     89    if (this.skipAlliedVictoryCheck || this.endlessGame)
    8790        return;
    8891
    8992    let cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface);