Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5675 closed defect (fixed)

" and undefined have won the game" victory chat message when ceasefire ended

Reported by: elexis Owned by: Silier
Priority: Must Have Milestone: Alpha 24
Component: Simulation Keywords:
Cc: Patch: Phab:D2891

Description

When starting a game with exactly one player that instantly wins the game (consequest victory) and after that ceasefire running out will trigger first the correct victory chat message, then a broken and undefined have won the game chat message, initiated from the ceasefiremanager.

The bug could be reproduced on a23b.

Attachments (1)

commands.txt (131.2 KB ) - added by elexis 4 years ago.
23481 replay to reproduce

Download all attachments as: .zip

Change History (5)

comment:1 by elexis, 4 years ago

First the correct victory message:

WARNING: ({type:"won", players:[1], allies:[1], message:{message:"%(lastPlayer)s has won (last player alive).", pluralMessage:"%(players)s and %(lastPlayer)s have won (last players alive).", pluralCount:1}})
WARNING: "parse@gui/session/chat/ChatMessageFormatSimulation.js:116:15\nparseMessage@gui/session/chat/ChatMessageHandler.js:71:14\nhandleMessage@gui/session/chat/ChatMessageHandler.js:53:19\naddChatMessage@gui/session/messages.js:466:2\nplayersFinished@gui/session/session.js:471:1\ng_NotificationsTypes.won@gui/session/messages.js:124:3\nhandleNotifications@gui/session/messages.js:322:4\nonSimulationUpdate@gui/session/session.js:633:2\nresetTemplates@gui/session/session.js:436:2\nonSelectionChange@gui/session/top_panel/PlayerViewControl.js:119:4\nselectViewPlayer@gui/session/top_panel/PlayerViewControl.js:81:3\nonPlayersInit@gui/session/top_panel/PlayerViewControl.js:60:3\ninit@gui/session/session.js:307:3\nreallyStartGame@gui/loading/loading.js:22:2\n"

Then the broken one:

WARNING: ({type:"won", players:[(void 0)], allies:[], message:{message:"%(lastPlayer)s has won (last player alive).", pluralMessage:"%(players)s and %(lastPlayer)s have won (last players alive).", pluralCount:0}})
WARNING: "parse@gui/session/chat/ChatMessageFormatSimulation.js:116:15\nparseMessage@gui/session/chat/ChatMessageHandler.js:71:14\nhandleMessage@gui/session/chat/ChatMessageHandler.js:53:19\naddChatMessage@gui/session/messages.js:466:2\nplayersFinished@gui/session/session.js:471:1\ng_NotificationsTypes.won@gui/session/messages.js:124:3\nhandleNotifications@gui/session/messages.js:322:4\nonSimulationUpdate@gui/session/session.js:633:2\n__eventhandler4 (SimulationUpdate)@session SimulationUpdate:0:1\n"
WARNING: ({type:"ceasefire-ended", players:[-1]})

So theres a wrong GUI Interface notification, so the cause is not in the gui/ but in simulation/.

by elexis, 4 years ago

Attachment: commands.txt added

23481 replay to reproduce

comment:2 by Silier, 4 years ago

Milestone: BacklogWork In Progress
Owner: set to Silier
Patch: Phab:D2891

comment:3 by Silier, 4 years ago

Resolution: fixed
Status: newclosed

In 23857:

Fix message on allied victory with no active players

When starting a game with exactly one player that instantly wins the game (consequest victory) and after that ceasefire running out will trigger first the correct victory chat message, then a broken and undefined have won the game chat message, initiated from the ceasefiremanager.

Check for allies emptyness and do not send it if no players are active, what means they all have been defeated or won.

Differential Revision: https://code.wildfiregames.com/D2891
Fixes: #5675

comment:4 by Silier, 4 years ago

Milestone: Work In ProgressAlpha 24
Note: See TracTickets for help on using tickets.