Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3489 closed defect (fixed)

[PATCH] Gamesetup chat colors wrong

Reported by: Stan Owned by: mimo
Priority: Should Have Milestone: Alpha 19
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

We experienced the bug today on r17108

Steps to reproduce :

  1. Open the lobby
  2. Join a game
  3. Ask the host to change player colors

You will see that you kept the original color for the chat, while you should have a new one.

Attachments (3)

gamesetup.js.patch (933 bytes ) - added by AlThePhoenix 9 years ago.
I used playerData[playerSlot].Color from function selectPlayerColor(playerSlot, colorIndex). Works for me so far, but I'm not sure if this is the proper way to do it.
t3489_fix_gamesetup_chat_colors_V2.patch (1.2 KB ) - added by elexis 9 years ago.
Credit goes to Evulant (AlThePhoenix).
gamesetup.js.2.patch (1.2 KB ) - added by AlThePhoenix 9 years ago.
Better approach

Download all attachments as: .zip

Change History (8)

comment:1 by AlThePhoenix, 9 years ago

This also happens when hosting a game yourself and it is not an updating issue. The problem is that gamesetup.js' mapSettings refers to the color set in the map's .xml file (or in case of Random Map, the default colors); see gamesetup.js in function addChatMessage(msg) at lines 1800-1808.

  1. Make sure preserve match settings is activated
  2. Host a game (no need to go into the lobby)
  3. Be the first player (default) and change your color
  4. Write a message and notice how your chat color is still blue
  5. Leave the game and host again
  6. See 4.

by AlThePhoenix, 9 years ago

Attachment: gamesetup.js.patch added

I used playerData[playerSlot].Color from function selectPlayerColor(playerSlot, colorIndex). Works for me so far, but I'm not sure if this is the proper way to do it.

comment:2 by elexis, 9 years ago

Keywords: patch review added
Milestone: BacklogAlpha 19
Summary: Colors are not properly applied in MP gamesetup[PATCH] Gamesetup chat colors wrong

Right, if we read the player color from the map settings, then it's no surprise it doesn't update when changing the color with #1580.

by elexis, 9 years ago

Credit goes to Evulant (AlThePhoenix).

by AlThePhoenix, 9 years ago

Attachment: gamesetup.js.2.patch added

Better approach

comment:3 by AlThePhoenix, 9 years ago

Nevermind me. Didn't refresh the page x)

comment:4 by mimo, 9 years ago

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 17112:

fix wrong chat colors, patch by AlThePhoenix, fixes #3489

comment:5 by mimo, 9 years ago

Keywords: review removed

Thanks for the patch

Note: See TracTickets for help on using tickets.