Changes between Version 1 and Version 2 of Ticket #4431, comment 4
- Timestamp:
- Jan 2, 2017, 9:40:48 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4431, comment 4
v1 v2 3 3 4 4 Sandarac changed the previous `messages.js` diff to the current proposal after a discussion on irc. 5 Since all observers have the playerID `-1`, chat handling based on playerID was conceptually broken (#3270) and replaced with player GUID parsing for private messages (thus being able to distinguish observers). The function `GetPlayerGUID` introduced r17771 utilized for that returns either the client identifier (GUID) or the empty string. In Singleplayer however, the gamesetup/session use `local` as a placeholder identifier in `g_PlayerAssignments`. I didn't want to transport this hardcoding to C++, but it is a possibility alternative to the proposal (or adding a new JS only function that returns GetPlayerGUID() || "local"to avoid some of the other "local" checks too).5 Since all observers have the playerID `-1`, chat handling based on playerID was conceptually broken (#3270) and replaced with player GUID parsing for private messages (thus being able to distinguish observers). The function `GetPlayerGUID` introduced r17771 utilized for that returns either the client identifier (GUID) or the empty string. In Singleplayer however, the gamesetup/session use `local` as a placeholder identifier in `g_PlayerAssignments`. I didn't want to transport this hardcoding to C++, but it is a possibility alternative to the proposal (or adding a new JS only function that returns `GetPlayerGUID() || "local"` to avoid some of the other "local" checks too).